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.
I'm assuming that this will function as another input into a GC scheduler rather than completely suppressing GCs.
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!)
(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?
(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.
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
Moving this to P2 for post 57 work.
Whiteboard: [qf:p1] → [qf:p2]
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
Last Resolved: 3 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1351790
You need to log in before you can comment on or make changes to this bug.