mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Undo #18497 in the MatchAndCascade case.
It's easy to construct examples where not inserting in those cases causes performance to get worse (for example, any long list of siblings that match the same selectors while having some non-effectual differences in LocalName/Class/Id/etc). And the LRU nature of the cache already does the right thing of pruning non-useful entries. Fixing this causes several hundred more sharing hits on wikipedia. MozReview-Commit-ID: L7W8vcMnHaq
This commit is contained in:
parent
fac923395e
commit
703a5c93d0
2 changed files with 23 additions and 11 deletions
|
@ -554,11 +554,6 @@ impl<E: TElement> StyleSharingCache<E> {
|
|||
validation_data_holder: Option<&mut StyleSharingTarget<E>>,
|
||||
dom_depth: usize,
|
||||
) {
|
||||
if style.0.reused_via_rule_node {
|
||||
debug!("Failing to insert into the cached: this was a cached style");
|
||||
return;
|
||||
}
|
||||
|
||||
let parent = match element.traversal_parent() {
|
||||
Some(element) => element,
|
||||
None => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue