Demo takes 3mins to run and spends 2.4mins in nsParentNodeChildContentList::ValidateCache. Chrome runs in 20s
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: mayankleoboy1, Assigned: emilio)
References
()
Details
Attachments
(2 files)
Go to https://highlight.xyz/mint/65758ec0c56a0da366b32ab7
AR: It takes 3 minutes on my machine for the demo to render. Chrome renders in ~20seconds.
Profile: https://share.firefox.dev/4cVkSkp
Reporter | ||
Comment 1•11 months ago
|
||
Comment 2•11 months ago
|
||
This could perhaps be improved by making sure there is capacity in the array in ValidateCache but it didn't seem to matter much. :smaug, your good at perf solutions. Do you have an idea?
Assignee | ||
Comment 3•11 months ago
|
||
We don't need to update the cache to get the child count...
Assignee | ||
Comment 4•11 months ago
|
||
function removeChildNodes() {
_pathCount = 0;
while (_svg.childNodes.length > 0) {
_svg.removeChild(_svg.childNodes[0]);
}
}
Assignee | ||
Comment 5•11 months ago
|
||
Child count is constant so we don't need the cache. Add a fast path for
uncached first / last node.
Updated•11 months ago
|
Assignee | ||
Updated•11 months ago
|
Reporter | ||
Comment 7•11 months ago
|
||
Profile with the autoland build now takes 15 seconds: https://share.firefox.dev/4glRt5O
So we are now faster than Chrome here. Pretty nice!
Comment 9•11 months ago
|
||
bugherder |
Reporter | ||
Comment 10•11 months ago
|
||
And with hte latest Nightly: https://share.firefox.dev/3zlzpIj (15s with the profiler) - I think this 15s is more accurate and represents the demo running rather than the whole pageload.
Updated•11 months ago
|
Comment 11•10 months ago
|
||
Reproducible on a 2024-09-08 Nightly build on Windows 10.
Verified as fixed on Firefox 132.0b7 and Firefox Nightly 133.0a1 on Windows 10, macOS 14, Ubuntu 22.
Description
•