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)
Core
CSS Parsing and Computation
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).
| Reporter | ||
Updated•8 years ago
|
Priority: -- → P1
| Reporter | ||
Updated•8 years ago
|
Blocks: stylo-perf
Comment 1•8 years ago
|
||
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
Comment 3•8 years ago
|
||
(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)
| Reporter | ||
Comment 4•8 years ago
|
||
(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.
Comment 6•8 years ago
|
||
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?
| Reporter | ||
Comment 7•8 years ago
|
||
(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.
Description
•