Re:O(N^2) in CreateProcess
by brucedawson on Monday April 22, 2019 @11:54AM
(#19719896)
When building Chrome from source code our build system creates about 70,000 processes. This is enough that, even without CFG issues, process-creation time is a factor in the minimum build time.
[ Parent
| on HN ]
Sounds like it might work much better to only have as many processes as there are logical cores.
Most build processes are going to run at least the compiler once per code file. Plus or minus a linker and preprocessor and whatever else. Nobody said all 70,000 quoted processes were run simultaneously.
You could presumably write a compiler that didn't do the traditional start - read - process - output - quit cycle to avoid paying startup costs, but it is generally assumed that startup cost is small relative to processing, and that avoiding complexity is worth the cost; if your OS makes startup really expensive, maybe that's not a reasonable assumption.
Re:O(N^2) in CreateProcess
by brucedawson on Monday April 22, 2019 @08:49PM
(#19724616)
We avoid having more processes that cores running at a time. But we run a separate compiler instance for each file we compile, 'cause why not? So, 70,000 processes over the length of the build.