We seem to be doing lots of SQL at startup.

RESOLVED WONTFIX

Status

()

Toolkit
Storage
RESOLVED WONTFIX
7 years ago
5 years ago

People

(Reporter: Yoric, Unassigned)

Tracking

({perf})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Snappy:P3])

Attachments

(3 attachments)

Created attachment 565570 [details]
A list of all SQlite requests executed at startup, sorted by database, based on a non-trivial profile

The attached dump lists SQL requests performed during startup (not necessarily by the main thread) with a reasonable profile. This list is impressively long. We should check, because this seems way too much.
Created attachment 566204 [details]
A list of all SQlite requests executed at startup, sorted by database, based on a non-trivial profile - mobile version

Same measures, using the same profile, on Fennec.

Comment 2

7 years ago
Comment on attachment 566204 [details]
A list of all SQlite requests executed at startup, sorted by database, based on a non-trivial profile - mobile version

Is this any different if you use firstPaint instead of sessionRestored as your startup trigger? I'm confused why places isn't showing
Places is inited asynchronously by the first visit (or favicon) addition, so it's likely the measure stops too early. Just immediately later it is inited by the Star (that I'm trying to remove in bug 692120)
I think session-restored may be fired before the UI is actually shown.
For the moment, I'm synchronizing on sessionstore-windows-restored. Which event do you suggest using?
I don't recall if browser-delayed-startup-finished fires before or after sessionstore-windows-restored, it may be worth a shot
Created attachment 566507 [details]
A list of all SQlite requests executed until places-init-complete, sorted by database, based on a non-trivial profile - mobile version.

Actually, I never see any notification of "browser-delayed-startup-finished". However, I attach the list until "places-init-complete".
(In reply to David Rajchenbach Teller [:Yoric] from comment #6)
> Actually, I never see any notification of
> "browser-delayed-startup-finished".

That is... surprising! http://mxr.mozilla.org/mozilla-central/source/browser/base/content/browser.js#1723
btw, the second connection that you see here:

Operations on  "places.sqlite": 2
	SELECT * FROM sqlite_master
	SELECT root_name, folder_id FROM moz_bookmarks_roots

is what I'm removing in bug 692120, if only Ts_shutdown would not be stupid!

Comment 9

7 years ago
(In reply to David Rajchenbach Teller [:Yoric] from comment #4)
> For the moment, I'm synchronizing on sessionstore-windows-restored. Which
> event do you suggest using?

I'd consider startup incomplete until sessionRestored and firstPaint has been set, see http://mxr.mozilla.org/mozilla-central/source/toolkit/components/startup/nsAppStartup.cpp#106 for firstpaint.
Do you have any information about the profile you used and what the testing procedure was, the extension manager DB accesses look to be us reloading all the extension data from install.rdf files. This would happen if we thought the timestamps on the extension's files had changed since the last run.
Whiteboard: [Snappy]

Updated

7 years ago
Whiteboard: [Snappy] → [Snappy:P3[

Updated

7 years ago
Whiteboard: [Snappy:P3[ → [Snappy:P3]
Activity has moved to a bunch of other bugs. Closing.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.