A rogue script using postMessage in a loop makes the browser use more and more memory
Categories
(Core :: DOM: postMessage, defect, P3)
Tracking
()
Performance Impact | none |
People
(Reporter: julienw, Unassigned)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
From Bug 1291905:
- Open the attachment.
=> The browser takes more and more memory.
=> Other pages can be janky because of that.
Here is a profile from my computer: https://share.firefox.dev/3kPzTLT
The fact that we use more and more memory seems strange to me.
Comment 1•2 years ago
|
||
Hmm, there seem to be some GCing at the end of the profile, but memory continues to increase. Probably we should let run it for longer to see if we really leak, absolute numbers of used memory are not too high here.
Comment 2•2 years ago
|
||
One needs GC/CC to run to delete the objects. And since the example is making main thread busy, idle runnables don't run but we fallback to timers. Locally I see memory staying between 100 and 320MB.
I don't think this should be tracked as performance bug. Web pages have tons of way to create lots of garbage.
We could tweak some heuristics to trigger GC/CC sooner, but the testcase is totally artificial, so the testcase itself isn't a good reason to do it.
Reporter | ||
Comment 3•2 years ago
|
||
Note that there was a real page in bug 1291905 (although a benchmark page), but it doesn't exist anymore.
Description
•