A brief twitter observation convinced me to dig into our build system effeciency. First off, some numbers from a -j10 build after a `make clean`:

origin/master:
real    3m51.867s
user    3m41.425s
sys     0m10.434s

jdm/parbuild [1]:
real    2m36.697s
user    4m9.334s
sys     0m10.177s

With the changes from my parbuild branch, we build all subdirectories in parallel, then libmsg and libutil together, libnet by itself, then libgfx and libscript build together, followed by the main servo crate. It's probably possible to decouple libgfx from libnet (there are precisely two references to the Image type from libnet), but that wouldn't actually affect the total build time in a parallel setting, since libgfx takes 12 seconds, libscript takes 60s, the servo crate takes 46s, and the rest are on the low end of less than 10 seconds. libscript is obviously the long tail, and it's going to get worse as time goes on.

With all that said, the main change of moving Au from libgfx to libutil to decouple libscript from libgfx is not thrilling, but possibly worth it. At this point, the biggest clean build wins will come from real submodule dependencies, and incremental build wins from splitting up libscript somehow into isolated crates. Not really sure how to do that, unfortunately.

The other big win comes from removing our incorrect use of the ..NOPARALLEL target from our makefiles. Whether this would bring back our old problems of phantom dependency problems for which it was originally added is unclear, but it looks to me like the other changes in that commit [2] should make it unnecessary.

I guess I'll make a PR for my changes so we can debate about the win of building libgfx and libscript in parallel versus the hold-your-nose feeling of moving Au into libutil.

Cheers,
Josh

[1] https://github.com/jdm/servo/commit/cecc02d918a546eee4b7e17fe8bad00c2cafe968 [2] https://github.com/mozilla/servo/commit/3a5d9bdae27a9bcb43e43cb6603b5e5bc29bbe82
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to