Please sign in to comment.
style: Use only Origin during the cascade, rather than CascadeLevel.
The micro-benchmark `style-attr-1.html` regressed slightly with my patch, after the CascadeLevel size increase. This benchmark is meant to test for the "changing the style attribute doesn't cause selector-matching" optimization (which, mind you, keeps working). But in the process it creates 10k rules which form a perfect path in the rule tree and that we put into a SmallVec during the cascade, and the benchmark spends most of the time pushing to that SmallVec and iterating the declarations (as there's only one property to apply). So we could argue that the regression is minor and is not what the benchark is supposed to be testing, but given I did the digging... :) My patch made CascadeLevel bigger, which means that we create a somewhat bigger vector in this case. Thankfully it also removed the dependency in the CascadeLevel, so we can stop using that and use just Origin which is one byte to revert the perf regression. Differential Revision: https://phabricator.services.mozilla.com/D53181
- Loading branch information
Showing with 26 additions and 23 deletions.