Closed Bug 621802 Opened 13 years ago Closed 13 years ago

[regression] UI blocks for >3 seconds in PlacesUtils.getMostRecentBookmarkForURI


(Firefox for Android Graveyard :: General, defect)

Not set


(Not tracked)



(Reporter: mbrubeck, Assigned: mbrubeck)



(Keywords: main-thread-io, perf, regression)


(1 file)

Using recent Fennec nightlies on Android (for at least the past week), the UI freezes and becomes completely unresponsive for several hundred milliseconds during each page load.
tracking-fennec: --- → ?
Each pageload does trigger some Places code, both internally and in our front end. For example, we check to see if the page is bookmarked and if so, we toggle the "star".
I verified that the updateStar function frequently takes 3-5 seconds (!) to return on my Galaxy Tab with a large profile, and this seems to correspond with the page loads where the UI is unresponsive.
Summary: [regression] Fennec UI is unresponsive for around .5 to 1 second during page load → [regression] UI blocks for >3 seconds in PlacesUtils.getMostRecentBookmarkForURI
It looks like Minefield recently fixed this in bug 613477; we can the same PlacesUtils code to fix it in Fennec.
Assignee: nobody → mbrubeck
Severity: normal → major
Depends on: 613477
Using PlaceUtils.asyncGetBookmarkIds  ?
Attached patch patchSplinter Review
Use async bookmark lookup during page load.  This fixes the problem for me on desktop and device.  Bookmark tests still pass with this patch (on desktop).
Attachment #500247 - Flags: review?(mark.finkle)
Attachment #500247 - Flags: review?(mark.finkle) → review+
Closed: 13 years ago
Resolution: --- → FIXED
I, for one, love our new async overlords.
*and* this appears to have gotten us a Ts win (at last on Tracemonkey), which is expected since you aren't doing synchronous I/O on the GUI thread during startup anymore!

Fennec may even want to whitelist the default home page so that no lookup is done (we whitelisted about:blank in PlacesUtils code).
The browser certainly doesn't hang for >3 seconds, but there's a very noticeable hang for ~1 sec once the title and favicon are updated for the page and content is loading onto the window. 

The pages I tried and found this issue on are:

The pages I tried and did NOT find this issue on are:

Also, there's a noticeable hang when going to the controls panel as well which I think it related to this. Should I file another bug here?
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.