Limit history item pref to 300
Categories
(Firefox :: Firefox View, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox119 | --- | verified |
People
(Reporter: jsudiaman, Assigned: jsudiaman)
References
Details
(Whiteboard: [fidefe-firefox-view])
Attachments
(1 file)
If the browser.firefox-view.max-history-rows pref is set to a high number (>= 2000), or disabled entirely (-1), then loading History invariably causes the browser to hang. Profiling shows that the Lit method scheduleUpdate() can take up to a half second to complete, and there are many such calls being fired in quick succession.
To prevent this, we should delay loading the rows that are further down the list. Lit does allow us to control the timing of updates by overriding this method. As a quick and dirty example, I added this function to FxviewTabRow:
async scheduleUpdate() {
await new Promise(resolve =>
Services.tm.idleDispatchToMainThread(() => resolve())
);
super.scheduleUpdate();
}
This comes with the obvious caveat that there will be a bunch of blank rows if the user decides to scroll immediately upon switching to History before it is “fully loaded”. But it is definitely preferable to locking up the browser.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
Comment 3•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Comment 4•3 years ago
•
|
||
For clarity, we landed this patch with the max history entries pref to 300 based on QA feedback (and not the idea Jonathan was investigating in comment 0) since it was determined that the implementation would be buggy and that the real fix will be virtualization, which Kelly can focus on after we wrap up remaining requirements for 119.
Updated•3 years ago
|
Comment 5•2 years ago
|
||
Verified as fixed Firefox 120.0a1 and Firefox 119.0b9 Windows 10x64, macOS 13 and Ubuntu 18.4
Updated•2 years ago
|
Description
•