Closed
Bug 77236
Opened 25 years ago
Closed 24 years ago
Move GC to after page load (20ms out of 190ms)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
mozilla1.0.1
People
(Reporter: ian, Assigned: jst)
Details
(Keywords: perf, Whiteboard: [Hixie-P5])
(found by hyatt during a quantify run of google)
When loading a page, we do a GC in SetNewDocument() (in nsGlobalWindow.cpp).
We'd like to move the GC till after the onload handler fires, effectively
delaying it until we are idle (and the user is reading the page), instead of
doing it during the page loading.
The code currently says that mContext might get released while doing this (and
thus we use a kungFuDeathGrip), but just below it there is a check to see if
mContext is still there. This seems to point to either a lurking bug or a reason
why we can't move the GC.
Any comments?
| Reporter | ||
Updated•25 years ago
|
Comment 1•25 years ago
|
||
Removing this actually slows things down on jrgm's tests.... so this may be an
INVALID.
Status: NEW → ASSIGNED
Comment 2•25 years ago
|
||
Note: (this may not apply, if hyatt was running with the default page-to-page
(non-zero) delay value, but I thought I'd mention it anyways.) If you are
running the test with '0' delay in page loads, then the test will never see the
benefit of making this change. That is because I measure the "onload to onload"
interval, minus whatever delay value is selected.
So, if we defer a GC (assuming it is deferable) until after the onload occurs
_and_ the delay time is greater than the time required for the GC, then we get
the cost of the GC "for free" since it will occur while no page is actively
being processed. However, if the delay time is '0', then there is no idle time
during the test, and the "cost" of the GC is included in the loading time for
each page.
Comment 3•25 years ago
|
||
This is a dup of a futured jst bug. Reassigning to him so he can dup it. (We
force a GC during every window create/document create.)
Assignee: hyatt → jst
Status: ASSIGNED → NEW
| Reporter | ||
Comment 4•25 years ago
|
||
John: the '0 delay' case is artificial and not found in normal browsing
situations, so we shouldn't be concerned with whether or not this "fixes" it
for that case. :-)
Comment 5•25 years ago
|
||
Er, yeah. That was my point: it is artificial. Running the page loader with
'0' delay is the wrong way to assess the benefit that a real user, who pauses
from page to page, might experience. (But I don't know which way hyatt was
testing this, so it may still be moot).
| Reporter | ||
Comment 6•25 years ago
|
||
Ok, cool. We're on the same page. Hyatt is indeed doing his tests with a delay,
so that should be ok.
| Assignee | ||
Updated•25 years ago
|
Target Milestone: --- → mozilla1.0
Comment 7•24 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 8•24 years ago
|
||
jst, you did this already, right? (and it was a win).
| Assignee | ||
Comment 9•24 years ago
|
||
Yup, I did this...
*** This bug has been marked as a duplicate of 42321 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•