Closed Bug 1187171 Opened 5 years ago Closed 5 years ago

TabManager.storeChanges called twice during restore

Categories

(Firefox for iOS :: Data Storage, defect)

All
Unspecified
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fxios + ---

People

(Reporter: rnewman, Assigned: fluffyemily, Mentored)

Details

(Keywords: perf, Whiteboard: [good second bug][lang=swift])

Attachments

(1 file)

47 bytes, text/x-github-pull-request
sleroux
: review+
sleroux
: feedback+
Details | Review
This ultimately hits the DB twice as much as necessary.
Ah. It's actually called once per entry in history during restore!

    func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
        hideNetworkActivitySpinner()
        storeChanges()
    }

And even then it's wrong, seemingly missing history.
Culprit of slow startup? Ought to track, no?
tracking-fxios: --- → ?
Keywords: perf
Triage explanation: plus for this because it affects startup. Not plus for Bug 1187176, even though we'd love a fix.
Assignee: nobody → etoop
Attached file Pull request
Attachment #8642940 - Flags: review?(sleroux)
Comment on attachment 8642940 [details] [review]
Pull request

Fixes look good but left a comment on resolving the issue pointed out in this bug.
Attachment #8642940 - Flags: feedback+
Attachment #8642940 - Flags: review?(sleroux) → review+
I think the issue with storeChanges() getting called too often overall and the fact that storeChanges() is pretty heavy in it's implementation (delete all tabs from the db, create them all again AND write tabs to disk) will all come under https://bugzilla.mozilla.org/show_bug.cgi?id=1187176 with this one being purely about slow startup performance
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.