You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stylo is slow to compile! It can take 30+ seconds (Apple M1 Pro under load from also compiling other code), and doesn't parallelise well. This is particularly noticeable for Blitz where overall compile for a minimal build are only 50s, but also shows up as a compile time outlier in Servo builds. Let's see if we can make it faster.
Notes
Due to building as a single crate, the style crate's compilation is poorly parallelised. Other large crates can take as long to compile in total but are parallelised over 10 cores so ends up having a much smaller impact on overall compile time.
The style crate spends an unusually high proportion of time in the compiler frontend. I suspect this may be due to the large size of the crate, and some rustc codepaths having non-linear time complexity with respect to the size of a crate.
Ideas
Split "support code" into their own crate (e.g. gecko_bindings shouldn't depend on style)
Split values/properties modules into crates by related property (e.g. "core numeric types" (e.g. Length, LengthPercentage, etc), one for "color types", one for "flexbox types", one for "css grid types") which can then compile in parallel / pipelined.
The text was updated successfully, but these errors were encountered:
Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1938784
Stylo is slow to compile! It can take 30+ seconds (Apple M1 Pro under load from also compiling other code), and doesn't parallelise well. This is particularly noticeable for Blitz where overall compile for a minimal build are only 50s, but also shows up as a compile time outlier in Servo builds. Let's see if we can make it faster.
Notes
Ideas
The text was updated successfully, but these errors were encountered: