Just a happy update that the code size reduction work we've been doing on
the style system also seems to have made an impact on build times.

Over the past week, we've removed almost half a megabyte of code from
libxul. On my linux64 ThinkStation, an optimized build of the style system
[1] seems to have gone from 3:11 to 2:30 over that same timeframe, which is
a ~20% reduction.

Hopefully this will translate to better productivity for everyone hacking
on Gecko. It's also a good reminder that code size is correlated with build
times, giving us an extra incentive to reduce it where we can [2].

Big thanks to everyone who's been helping out here, especially Anthony
Ramine (nox), whose overhaul of the serialization code likely had the
single biggest impact.

Finally, I wanted to share one trick that may not be obvious to everyone.
If you find yourself triggering rebuilds of the style system after changing
C++ header files, and you're sure that no relevant memory layouts have
actually changed, you can interrupt the Rust compilation after the C++ code
has linked, and your changes should still take effect. YMMV, but I do this
a lot.

Cheers,
bholley

[1] ./mach clobber && ./mach build && touch layout/style/nsStyleStruct.h &&
./mach build toolkit/library/rust
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1432996
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to