Optimize nsFilterInstance allocation
Categories
(Core :: SVG, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: dholbert, Assigned: smaug)
References
Details
Attachments
(1 file)
1.49 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
See bug 1427417 comment 10 - it seems we've got some nsFilterInstance malloc/free churn shown in this profile: https://perfht.ml/2Ddr9dH
This is when hovering at https://kangax.github.io/compat-table/esnext/ , without webrender enabled.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
and https://searchfox.org/mozilla-central/rev/c21d6620d384dfb13ede6054015da05a6353b899/gfx/src/FilterSupport.h#467 too ?
I don't know how large those arrays normally are.
Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #2)
and https://searchfox.org/mozilla-central/rev/c21d6620d384dfb13ede6054015da05a6353b899/gfx/src/FilterSupport.h#467 too ?
I don't know how large those arrays normally are.
Should be no more than 2. Most commonly 1, rarely 0 or 2.
Assignee | ||
Comment 4•5 years ago
|
||
The obvious fix to replace those with AutoTArray<, 2> crashes. Something very bogus looking objects in FilterSupport::ComputePostFilterExtents. I assume some copy or move constructor doens't quite work. I'll look tomorrow.
Assignee | ||
Comment 5•5 years ago
|
||
This helps a bit, but the filter code seems to be rather malloc heavy.
For example nsFilterInstance::ComputePostFilterExtents and nsCSSFilterInstance::SetBounds
Updated•5 years ago
|
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cee37d07397c make FilterPrimitiveDescription usage a tad less malloc heavy, r=mstange
Comment 7•5 years ago
|
||
bugherder |
Description
•