Closed
Bug 726442
Opened 13 years ago
Closed 13 years ago
[meta] Run the CC less often by removing childless nodes from the purple buffer
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: mccr8, Unassigned)
References
Details
(Whiteboard: [Snappy:P2])
In bug 725377, Gregor noticed that the cycle collector runs every 5 seconds. Using bug 726252, I noticed that this was due entirely due to childless nodes being added to the purple buffer.
Childless nodes in the cycle collector graph can't be part of a garbage cycle. Because of this, we don't need to suspect them. Due to incomplete unlinking, we still may want to add them to the CC graph, should some other suspected node reach them and turn out to be garbage.
These nodes don't have a particularly huge impact on the size of the graph: their primary negative impact is causing the CC to run more often. We can give these classes a CanSkip (which decides when to remove things from the purple buffer in between CCs) and maybe a CanSkipInCC (which decides when to remove things from the purple buffer at the start of a CC), but leave their CanSkipThis behavior alone (which decides when a node should be added to the CC graph).
Reporter | ||
Updated•13 years ago
|
Reporter | ||
Comment 1•13 years ago
|
||
Another category of things we can remove from the purple buffer are XPConnect roots: they are going to be added anyways, so there's no need to remember them in the purple buffer.
Reporter | ||
Comment 2•13 years ago
|
||
Here are the top childless nodes that show up in the purple buffer, from scrolling around on TechCrunch:
72 nsDOMCSSAttributeDeclaration
174 nsGenericElement (XUL)
93 nsDOMCSSAttributeDeclaration
67 nsBindingManager
52 nsDOMAttributeMap
682 nsDOMEvent
264 nsGenericElement (XUL)
95 nsEventStateManager
94 nsBindingManager
171 nsDOMCSSAttributeDeclaration
138 nsGenericElement (XUL)
89 nsBindingManager
82 nsBaseContentList
60 nsDOMAttributeMap
80 nsBindingManager
This is with my fix for nsComputedDOMStyle and ChildContent.
Comment 3•13 years ago
|
||
Was there a GC before CC when nsDOMEvent showed up in the purple buffer?
Comment 4•13 years ago
|
||
...since I would expect DOMEvents to be deleted right after gc.
Reporter | ||
Comment 5•13 years ago
|
||
I don't know, sorry.
Reporter | ||
Comment 6•13 years ago
|
||
P1 because I think we can pick up some easy wins here. We're pretty bad right now about how often we run the CC (even though it is faster), and knocking out 3 or 4 of these junky classes from the purple buffer could help a lot.
Whiteboard: [Snappy] → [Snappy:P1]
Reporter | ||
Comment 7•13 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=7664fb2957e4
Try run that adds purple buffer removal for childless nsComputedDOMStyles, nsChildContentList and nsDOMCSSAttributeDeclaration.
Reporter | ||
Updated•13 years ago
|
Whiteboard: [Snappy:P1] → [Snappy:P2]
Reporter | ||
Comment 8•13 years ago
|
||
Should be fixed completely by bug 728460. We can still come up with other clever ways to remove boring things from the purple buffer, but CCs triggered by GCs are probably a bigger issue.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Reporter | ||
Updated•13 years ago
|
Resolution: WORKSFORME → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•