Closed
Bug 735014
Opened 13 years ago
Closed 13 years ago
GCs triggered from pagehide can interfere with the loading of another web page
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: ehsan.akhgari, Assigned: billm)
References
Details
(Whiteboard: [Snappy])
Attachments
(1 file)
(deleted),
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Here's the scenario. You click a link, this code <http://dxr.lanedo.com/mozilla-central/layout/base/nsDocumentViewer.cpp.html#l1292> schedules a GC in 4 seconds, then you start waiting on the network, etc, and in about the time when you have something to do in order to respond to the user's request, the GC timer fires and you get unresponsive if you're doing a big GC (which is possible since a previous page has been unloaded.)
I don't have a very good solution for this. I've seen this in profiles where I have been trying to measure why loading a page is slow, and I have seen this taking almost all of the time that we spend away from the event loop.
Comment 1•13 years ago
|
||
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsDocumentViewer.cpp?rev=5789df0e14d1#1285
Once we have iGC working, that would trigger just the start of incremental GC, and profiles
would look quite different. Big GCs shouldn't happen anymore, in general.
Reporter | ||
Comment 2•13 years ago
|
||
So do you recommend us closing this bug then?
Comment 3•13 years ago
|
||
Could we wait for iGC to work reliably, and re-test.
But, if that 4 second timer is bad, we could perhaps create a longer timer in this case.
We should do GC at some point, but it could be delayed. And it should run only if GC hasn't already
run after pagehide.
Comment 4•13 years ago
|
||
PokeGC takes 2nd parameter which is the time in ms.
Could you do something like NS_GC_DELAY*2 there?
NS_GC_DELAY should move to .h file.
Or check the reason in PokeGC, and if it is js::gcreason::PAGE_HIDE, do a longer delay.
Assignee | ||
Comment 5•13 years ago
|
||
Does the first thing, so now we're waiting 8 seconds instead of 4.
Comment 6•13 years ago
|
||
Comment on attachment 605206 [details] [diff] [review]
patch
Let's try this. And once iGC is there, we can remove this.
Could you make this bug to depend on the iGC bug, so that we don't forget.
Attachment #605206 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 7•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/58ebf0fed1e8
I made a new bug for re-enabling incremental GC, and now this bug depends on that.
Depends on: 735099
Target Milestone: --- → mozilla13
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•