Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
3 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters