Closed Bug 1518489 Opened 6 years ago Closed 6 years ago

Run _createPreloadBrowser off a deferred or an idle task

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1353013

People

(Reporter: Felipe, Unassigned)

Details

(Whiteboard: [fxperf])

I just noticed that _createPreloadBrowser is called synchronously from _handleNewTab. We should probably run it asynchronously from there, or go even further and try to delay and batch it.

Not sure how much batching would improve in real-life scenarios (are there valid use cases of several tabs being opened at the same time?), but it would probably at least improve running mochitests. AFAICT this wouldn't cheat on performance or talos tests because the browser.newtab.preload is already disabled there.

Granted, _handleNewTab is (on most cases) running from a transitionend event, but even then it seems worth to at least give the event loop a moment to breathe before creating the next browser.

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.