Closed Bug 725858 Opened 10 years ago Closed 10 years ago

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

Categories

(Firefox for Android Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: wesj, Assigned: wesj)

Details

Attachments

(1 file, 1 obsolete file)

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...
Attached patch Patch (obsolete) — Splinter Review
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)
Dang it wrong patch. One sec...
Attached patch PatchSplinter Review
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
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.