Don't load sqlite for profile migration unless we're actually migrating a profile

RESOLVED FIXED in Firefox 13

Status

()

RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: wesj, Assigned: wesj)

Tracking

unspecified
Firefox 13
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

7 years ago
I'm seeing the setup screen appear in Fennec, even though I have no previous profile on my device. There's two places I see us doing work we don't need. First, my brilliant GeckoDirProvider is creating a profile for us, even if we don't have or need one, which means we always think we have a profile.

Secondly, I'm seeing a lot of time spent in ensureSqliteLibsLoaded even though we aren't doing a migration. We'll do this on every startup, so we should delay and only do it if we know there's a data to migrate.

Patch for the second coming. I avoided offering the first option earlier because its a little tricky I think...
(Assignee)

Comment 1

7 years ago
Created attachment 595892 [details] [diff] [review]
Patch

This cuts the migration time from 500-100ms to around 3ms for me (to be fair I only saw 500 once). I assume we're hitting it every time, which is why I constantly see the startup splash fly by for a second I assume.
Assignee: nobody → wjohnston
Attachment #595892 - Flags: review?(gpascutto)
(Assignee)

Comment 2

7 years ago
Dang it wrong patch. One sec...
(Assignee)

Comment 3

7 years ago
Created attachment 595895 [details] [diff] [review]
Patch

I moved these timers outside the getProfileDir loop so that we could also include it in our measured time here (although its very small for me...).
Attachment #595892 - Attachment is obsolete: true
Attachment #595892 - Flags: review?(gpascutto)
Attachment #595895 - Flags: review?(gpascutto)
Attachment #595895 - Flags: review?(gpascutto) → review+
https://hg.mozilla.org/mozilla-central/rev/6b12265a4aa0
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
You need to log in before you can comment on or make changes to this bug.