I just landed https://bugzilla.mozilla.org/show_bug.cgi?id=572200 on
mozilla-inbound, which makes a slight change to a performance vs.
memory tradeoff in the style system.

In particular, in cases where we cache style data in the rule tree,
this causes us to cache the data on any rule nodes that are
referenced directly from a style context, rather than only caching a
style struct on the highest rule node to which it's relevant.  This
increases instances of the nsResetStyleData (and, occasionally,
nsInheritedStyleData) struct, which is an array of pointers to the
different style structs that we only bother allocating at all if we
have any structs.


On the tp5_paint workload, the change seems to be about a 1%-2%
performance improvement and a 0%-1% memory increase, depending on
platform (see data in the bug).

However, the real motivation for making the change is that it can
give a more substantial performance improvement in the processing of
dynamic style changes; for example, I measured a 14% performance
improvement on a testcase reduced from panning the Gaia homescreen.

Boris and I agreed that we should make this tradeoff, so I've landed
the patches, but I thought it was worth sharing the motivation here,
and warning others of the expected Talos notifications on
dev-tree-management.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to