Closed
Bug 1357813
Opened 9 years ago
Closed 8 years ago
Add a "GC Exclusion" mode which suppresses expensive GCs
Categories
(Core :: JavaScript: GC, enhancement, P3)
Core
JavaScript: GC
Tracking
()
RESOLVED
DUPLICATE
of bug 1351790
| Performance Impact | high |
People
(Reporter: djvj, Unassigned)
References
(Blocks 2 open bugs)
Details
(Keywords: perf)
Add a mode to the GC that suppresses (or at least heavily discourages) expensive GCs until the mode is over.
This mode should be used by Gecko for short-lived UX-sensitive operations where we don't want to introduce jank.
| Reporter | ||
Updated•9 years ago
|
Whiteboard: [qf]
Updated•9 years ago
|
Whiteboard: [qf] → [qf:p1]
Updated•9 years ago
|
Blocks: GCScheduling
Comment 1•9 years ago
|
||
I'm assuming that this will function as another input into a GC scheduler rather than completely suppressing GCs.
Comment 2•9 years ago
|
||
I think the use case here is indeed completely suppressing GC, but the implementation can certainly happen though an input to the scheduler (although I admit that I haven't been able to keep up with the GC scheduler proposals so I don't know to what extent that idea is practical!)
Comment 3•9 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from comment #2)
I'm not keen on the idea of suppressing GC entirely for arbitrary lengths of time because this can lead to OOM. I'd rather see something that increased the GC thresholds by a configurable factor, maybe as much as a factor of 2. This would effectively prevent GC in all but the most dire situation.
Do we have a list of places in the browser that this would be used?
Comment 4•9 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #3)
> Do we have a list of places in the browser that this would be used?
I would like to suppress GCs while opening a new tab or opening a new window (I saw profiles with GCs causing jank in the tab open animation, and delays before first-paint of new windows). But indeed, completely suppressing the GC may not be the best behavior if we do happen to already have plenty of tabs/windows and to lack available memory.
Comment 5•9 years ago
|
||
Cyclecollector could use this to try to avoid GC triggers when CC is running, since if GC runs then, CC needs to finish its work synchronously.
http://searchfox.org/mozilla-central/rev/4d8e389498a08668cce9ebf6232cc96be178c3e4/xpcom/base/CycleCollectedJSRuntime.cpp#1454,1459
http://searchfox.org/mozilla-central/rev/4d8e389498a08668cce9ebf6232cc96be178c3e4/xpcom/base/nsCycleCollector.cpp#3782,3793
Updated•8 years ago
|
Whiteboard: [qf:p2] → [qf:p1]
Updated•8 years ago
|
Whiteboard: [qf:p1] → [qf:i60][qf:p1]
Updated•8 years ago
|
Whiteboard: [qf:i60][qf:p1] → [qf:f60][qf:p1]
Updated•8 years ago
|
Whiteboard: [qf:f60][qf:p1] → [qf:f61][qf:p1]
Updated•8 years ago
|
Priority: -- → P3
| Reporter | ||
Comment 7•8 years ago
|
||
This is really a dup. Both this bug and the other one are about preventing expensive GCs when certain "critical UX" activity is happening, so as the reduce user-perceived jank. The other one is assigned, so it gets priority.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•4 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:f61][qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•