Open Bug 1350569 Opened 7 years ago Updated 9 months ago

Avoid full session history collect for DOMTitleChanged/OnHistoryReload

Categories

(Firefox :: Session Restore, enhancement)

enhancement

Tracking

()

Performance Impact low

People

(Reporter: JanH, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: perf:frontend)

OnHistoryNewEntry already only collects the new entry and likewise anything OnIndexChanged related (OnHistoryGoBack/GoForward/GotoIndex) only updates the history index without collecting any actual SHEntry data.

DOMTitleChanged/OnHistoryReload on the other hand still trigger a full collect, which negates some of the performance wins of partial history updates, because most page navigations will trigger DOMTitleChanged and therefore a full collect anyway. In theory, it ought to be enough to recollect starting from the current history entry for these two cases.

We need to be careful however, because at the moment, doing these full collects basically masks any problems caused by not properly handling partial updates (although GroupedSHistory might already surface some of these problems, because even a "full" collect will now only collect data within the same process).

Note that bug 1350567 *MUST* be resolved before changing the session store behaviour here, because our current behaviour will mostly (except on cross-process-navigation or for cases where the page title doesn't change on navigation and therefore doesn't trigger DOMTitleChanged) mask our failure to correctly collect LayoutHistoryState data, because we eventually catch it during the full collects triggered through DOMTitleChanged/OnHistoryRefresh.
(In reply to Jan Henning [:JanH] from comment #0)
> during the full collects triggered through DOMTitleChanged/OnHistoryRefresh.

That should be OnHistoryReload as well of course.
Whiteboard: [fxperf]
Difficult to say how much of an impact this would have without seeing a profile of the problem.
Whiteboard: [fxperf] → [fxperf:p3]
Severity: normal → S3
Performance Impact: --- → low
Keywords: perf:frontend
Whiteboard: [fxperf:p3]
You need to log in before you can comment on or make changes to this bug.