A Codepen demo can take 5GB+ memory use that reduces after 30s of CC
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: mayankleoboy1, Unassigned)
References
()
Details
Attachments
(2 files)
Go to https://codepen.io/jshawl/pen/dpbzxO
Enter "5000" in the input and click anywhere inside the demo
AR:
- 5GB+ memory use. If you take a about:memory report, almost all of that is in heap-unclassified.
- It takes a long time to process. Chrome is much faster and hardly uses 300MB RAM.
If you go to about:memory and reduce memory, the memory does reduce.
This is not a recent regression and I can repro this on a build from 2017.
Caveat: The "testcase" and the unintended input value of 5000 seem highly artificial.
Profile: https://share.firefox.dev/431fdUV
| Reporter | ||
Comment 1•3 years ago
|
||
| Reporter | ||
Comment 2•3 years ago
|
||
Look at PID-3088
| Reporter | ||
Updated•3 years ago
|
| Reporter | ||
Comment 3•3 years ago
|
||
this may probably end up being a silly testcase, so feel to resolve as WONTFIX.
| Reporter | ||
Comment 4•2 years ago
|
||
Latest profile : https://share.firefox.dev/45Wx6aw
Now, the memory usage increases to 6GB+, but after 27seconds of cycle collection, it reduces to 300MB.
| Reporter | ||
Updated•2 years ago
|
Comment 5•2 years ago
|
||
If I'm not mistaken this issue is the same as Bug 1857617. Each call to .innerHTML parses the text as DOM tree and adds it to the node's children (.innerHTML is rather heavy weight). However, Cycle Collection does not run, therefore memory piles up.
I'll close this as a duplicate, let's continue the discussion over in Bug 1857617. Sound good?
| Reporter | ||
Comment 6•2 years ago
|
||
Thanks for the quick analysis.
Description
•