Open
Bug 1199054
Opened 9 years ago
Updated 1 year ago
TryToStartImageLoad gets called way too often for CSS variable values that resolve to images
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: seth, Unassigned)
References
Details
It's not clear why, but bug 1181907 revealed that we are calling TryToStartImageLoad very frequently for CSS variable values (i.e., CSS property values that contain variables). Although bug 1181907 ensures that we won't leak ImageValues as a result of this, it still costs us in terms of performance, so we should fix it. The actual problem is probably more fundamentally that we are recomputing computed styles way too often for CSS variable values. (Forgive my no-doubt-terribly-correct terminology there.)
Reporter | ||
Comment 1•9 years ago
|
||
(Terribly-incorrect, of course.)
Component: General → CSS Parsing and Computation
Product: Firefox → Core
I talked about this with seth a bit. Perhaps we need to cache the substituted token stream, and only reparse and recompute it when the substituted token stream changes. (I don't think we have anything that does that now.)
Comment 3•9 years ago
|
||
Since any use of a variable causes the struct to be uncacheable in the rule tree, I think we can just store the cached result of the resolved property value on the nsCSSTokenStream itself. (Or an array of values, for when we had a shorthand with a variable reference.)
Comment 4•9 years ago
|
||
> store the cached result of the resolved property value on the nsCSSTokenStream itself
Not really, unless we keyed those cached results off the individual style contexts. I guess they need to go on the style context somewhere.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•