Closed Bug 949086 Opened 11 years ago Closed 10 years ago

Parallelize `commonplace includes`

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P5)

Avenir
x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: basta, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [good first bug][lang=js][lang=css])

The includes script powers our deploy processes and backs `commonplace fiddle`. This is fine, except theres quite a lot of data that needs processing. Consider:

- JS
 - Templates need to be precompiled
 - Scripts need to be read and concatenated
 - Uglify needs to process the whole bundle
- CSS
 - Each file needs to be run through stylus
 - Compiled stylus files need to be concatenated
 - clean-css needs to process the bundle(s)

All of this happens on the same thread, and in the case of Fiddle, it happens for all commonplace dependencies in the same thread. This means that a series of processes which all would independently take up to five seconds block for over a minute.

The code (which is already async) should be updated to process each parallelizable step in its own Node subprocess.

It's possible that the best way to accomplish this is to break out the includes function to accept CLI args, then have the includes function fire up child processes to itself with the appropriate args. That would allow this to work without needing to deal with forking.
I keep running this and it keeps coming back with different times. This whole bug might not be necessary. It could just be that something is secretly saturating my CPU. We may never know.

This isn't the hardest bug to fix (and there's certainly more than one way to resolve this), so marking as good first bug. If it's really bugging someone, it's fairly straightforward to resolve.
Keywords: perf
Whiteboard: [good-first-bug]
Priority: -- → P5
Whiteboard: [good-first-bug] → [good-first-bug][lang=js][lang=css]
Whiteboard: [good-first-bug][lang=js][lang=css] → [good first bug][lang=js][lang=css]
No longer blocks: tarako-marketplace
Blocks: 992365
No longer blocks: 992365
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.