Open
Bug 740523
Opened 12 years ago
Updated 2 years ago
Mark likely-leaked windows and documents as black for most CCs
Categories
(Core :: General, defect)
Core
General
Tracking
()
NEW
People
(Reporter: justin.lebar+bug, Assigned: smaug)
Details
(Whiteboard: [Snappy:P2])
Attachments
(1 file, 2 obsolete files)
22.49 KB,
patch
|
Details | Diff | Splinter Review |
So we have lots of cool optimizations to keep us from traversing active windows and their child objects. But all of these optimizations are useless as soon as we leak a window, whether due to a bug in Firefox or an add-on. Then we traverse all of the window's objects on every CC. In the case when our CC times are too long, perhaps we should stop traversing these likely-leaked windows' objects. We can say, if CC times are longer than X and a window has survived Y CCs since it was destroyed, mark it as black for most CCs. We can then do a full CC, with no pre-emptive black marking, upon idle, or once every 5 minutes, or something.
Reporter | ||
Comment 1•12 years ago
|
||
This bug might mitigate a lot of the jank we see due to zombie compartments.
Whiteboard: [snappy]
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → bugs
Updated•12 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Assignee | ||
Updated•12 years ago
|
Summary: Mark likely-leaked windows as black for most CCs → Mark likely-leaked windows and documents as black for most CCs
Assignee | ||
Comment 2•12 years ago
|
||
Something like this could work. Try to first CC possible zombie reasonable aggressively, but if that doesn't help, do it more rarely. But, at some point try to collect all the zombies.
Attachment #611778 -
Flags: feedback?(continuation)
Assignee | ||
Comment 3•12 years ago
|
||
This is a bit better. static svg-as-image documents don't end up to the CC graph after loading.
Attachment #611778 -
Attachment is obsolete: true
Attachment #611778 -
Flags: feedback?(continuation)
Attachment #611796 -
Flags: feedback?(continuation)
Assignee | ||
Comment 4•12 years ago
|
||
Hmm, that isn't quite good. if (mHasHadScriptHandlingObject) check removes also all the XBL documents from zombie list.
Assignee | ||
Comment 5•12 years ago
|
||
Don't mark resource documents (svg-as-image and others) as zombies. They are handled pretty differently.
Attachment #611796 -
Attachment is obsolete: true
Attachment #611796 -
Flags: feedback?(continuation)
Attachment #611908 -
Flags: feedback?(continuation)
Assignee | ||
Comment 6•12 years ago
|
||
Testing this now locally. Unfortunately I get zombies quite rarely. I wonder if I should rename nsZombieCycleCollectable to PossibleZombieCycleCollectable.
Assignee | ||
Comment 7•12 years ago
|
||
Hmm, I'm leaking, badly.
Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 611908 [details] [diff] [review] WIP3 I don't know yet what causes the leak, but I assume it is this patch.
Attachment #611908 -
Flags: feedback?(continuation)
Assignee | ||
Comment 9•12 years ago
|
||
Interesting. If I reload facebook, something keeps the document alive long enough so that it ends up being a zombie, and then, I think, because the patch doesn't try to collect it always it ends up staying alive. I guess simpler, and more conservative patch is needed. Try to collect X (X ~ 10 ?) times, and if the document is still alive, mark it to be a possible zombie.
Reporter | ||
Comment 10•12 years ago
|
||
> Interesting. If I reload facebook, something keeps the document alive long enough so that
> it ends up being a zombie, and then, I think, because the patch doesn't try to collect it always
> it ends up staying alive.
You may need a heuristic like ghost windows have, where if you have some FB page open, you try to collect all FB pages.
Or alternatively, can you tell whether the window has any content pointers to it?
Updated•12 years ago
|
Whiteboard: [snappy] → [Snappy:P2]
Comment 11•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: smaug → nobody
Comment 12•2 years ago
|
||
Sorry, there was a problem with the detection of inactive users. I'm reverting the change.
Assignee: nobody → smaug
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•