Closed Bug 1373357 Opened 8 years ago Closed 8 years ago

stylo: 25% of wikipedia styling spent in Gecko_MatchLang

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bholley, Unassigned)

References

(Blocks 1 open bug)

Details

Taken with STYLO_THREADS=1 on a local obama wikipedia copy: https://perfht.ml/2sxsgRu The first call to Servo_TraverseSubtree takes 52 ms. Of that time, 13ms is spent in Gecko_MatchLang. Almost all of that time (12ms) is under match_revalidation_selectors. Wikipedia is a bit unrealistic in how language-heavy it is. But I'm guessing there are still some easy wins here, especially considering that this function only appeared a week ago (in bug 1365162).
Priority: -- → P1
Blocks: stylo-perf
Seems like most of it is making string copies while getting the lang attribute... Which is something we did before btw, it just doesn't appear so much in profiles I guess. Presumably the best solution is bug 1370802?
See Also: → 1370802
Blocks: 1373362
Over to heycam for investigation.
Flags: needinfo?(cam)
(In reply to Emilio Cobos Álvarez [:emilio] from comment #1) > Seems like most of it is making string copies while getting the lang > attribute... Which is something we did before btw, it just doesn't appear so > much in profiles I guess. > > Presumably the best solution is bug 1370802? Seems likely. What do profiles look like with your patches there applied?
Flags: needinfo?(cam) → needinfo?(emilio+bugs)
(In reply to Cameron McCormack (:heycam) from comment #3) > (In reply to Emilio Cobos Álvarez [:emilio] from comment #1) > > Seems like most of it is making string copies while getting the lang > > attribute... Which is something we did before btw, it just doesn't appear so > > much in profiles I guess. > > > > Presumably the best solution is bug 1370802? > > Seems likely. What do profiles look like with your patches there applied? If emilio doesn't have an opt build handy, I'm also happy to just get all the relevant patches landed for this stuff and then I can remeasure.
Depends on: 1373800
Depends on: 1370802
Bobby had some numbers over bug 1373800.
Flags: needinfo?(emilio+bugs)
From the bug 1373800 comment 29 profile, it looks like we're down to ~10% under Gecko_MatchLang without the bug 1373800 patches, and it doesn't appear in the profile with them (presumably because the re-ordered selectors mean we don't bother checking the :lang() invalidations so much). Should we say we're done here?
(In reply to Cameron McCormack (:heycam) from comment #6) > From the bug 1373800 comment 29 profile, it looks like we're down to ~10% > under Gecko_MatchLang without the bug 1373800 patches, and it doesn't appear > in the profile with them (presumably because the re-ordered selectors mean > we don't bother checking the :lang() invalidations so much). It does appear, but to a much smaller degree. bz and I discussed, and think this is small enough to not worry about at this point.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.