Closed Bug 675051 Opened 13 years ago Closed 12 years ago

Load minimal amount of UI at startup

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(fennec+)

RESOLVED FIXED
Tracking Status
fennec + ---

People

(Reporter: stechz, Assigned: wesj)

Details

(Keywords: mobile, perf, Whiteboard: mobilestartupshrink)

Attachments

(1 file, 1 obsolete file)

To reduce the amount of time to first paint, we can minimize the interface as much as possible and load in the rest of the application after paint.

The prototype actually loads a different XUL page, completely from browser.xul. This idea may not be bad, in that extensions won't typically override it (and specific extensions like Personas still can). All Javascript logic that depends on browser load, UIReady, session restore, etc. will now automatically happen after first paint. It's a very big hammer.

However, this could cause issues with frontend pieces I haven't considered or with other extensions. I had to make a new observer called "browserwindowopened" because domwindowopened is no longer useful for adding event listeners.
(The first part of the diff is just for error and console dumping.)
Blocks: 673253
I'm not a huge fan of the "browserwindowopened". Why do we want that? to delay the AttachListsners call?
Yes. Since the window changes after domwindowopened, any listeners you attach will no longer remain once the browser is loaded.

Better ideas are welcome.
Re-attach listeners after the location changes?
You'd have to use progress listeners to do that every single time I guess? That sounds much much worse.
btw, the patch doesn't have the fakebrowser file
Attachment #549240 - Attachment is obsolete: true
tracking-fennec: --- → ?
I don't see how we can take the "browserwindowopened" change when add-ons and other code could be depending on it.
tracking-fennec: ? → +
I could also try making a new window instead of loading a new document. I worry this will regress overall time to responsive UI, but that can be tested.
tracking-fennec: + → ?
Assignee: nobody → ben
tracking-fennec: ? → +
Whiteboard: mobilestartupshrink
Keywords: mobile, perf
I wonder if we could use this when Fennec is started with a url argument. We could have a ui that was nothing more than a browser element that we started loading the page in. When onload fired, we could open the real browser window (in the background?) and move the loaded document inside?

Not sure how well that would work with our current e10s system, or if we'd need to inject panning code? Or if it would just be annoying to users to have a less than complete browser running...
Assignee: ben → wjohnston
No longer blocks: 673253
Fixed with native.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: