One discovery in bug 1331848 and the logging in bug 1331856 is that the style sharing doesn't appear to be getting populated at all. There are potentially several reasons for this. Emilio pointed out that the cache is optimized for parallel traversal, and probably doesn't do the right thing for sequential traversal. My logging also indicates that we never insert any elements into the cache because of "animations", which is probably wrong.
NI emilio to investigate!
Created attachment 8828614 [details] [diff] [review] Improve logging a tiny bit. Please fold this into your patch if you can, since we might as well get it in-tree.
I'm trying to land a preliminar patch for this at https://github.com/servo/servo/pull/15160
(Will probably land the logging patch as part of the rest of the style sharing cache changes)
This is probably p1 because it has a large impact on the performance measurements we'll get out of the style system. Let me know if it looks like it will take a lot of time and we can re-evaluate.
Some initial cleanup at https://github.com/servo/servo/pull/15888. I plan to make some improvements to the current cache before implementing the sequential logic.