On 03/17/2017 12:40 PM, Ted Mielczarek wrote:
On Fri, Mar 17, 2017, at 03:16 PM, Ben Kelly wrote:

For the 1:38 between Unified_cpp_js_src9.cpp and Interpreter.cpp only
a single cl.exe process is running.  I guess thats closer to 8% of the
total build time.  Still seems very weird to me.

Yeah, the JS engine uses a lot more complex C++ features than the rest
of the code in our tree, so it takes longer to compile. This is also why
the `FILES_PER_UNIFIED_FILE` setting is lower in js/src than the rest of
the tree. We do try to build js/src pretty early in the build, although
the exact workings of the compile tier is not something I currently
understand. One thing we could try here would be to hack up some
instrumentation to record the time taken to compile each source file,
which would let us determine if we need to tweak
`FILES_PER_UNIFIED_FILE` lower, at least.

If I'm understanding correctly, that's not really coming into play here. (Though maybe it would, if we had left it at the default.) The only thing that matters in this case is Interpreter.cpp, which is the slowest file to compile in the JS engine, and quite possibly in the whole browser. And FILES_PER_UNIFIED_FILE is not going to be able to break that one file down any more. (It is already compiled separately, and does not get unified with anything else.)

That's not even the largest file; js/src/jit/IonBuilder.cpp is 2.5x larger. But interpreters are really hard on compilers. Really, it's the single *function* that takes up half that file that is expensive. It's a JS interpreter. Starting it early in the build would certainly be good.

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to