TopSitesView.java executes a DB cursor on the main thread

RESOLVED FIXED in Firefox 21

Status

()

Firefox for Android
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mfinkle, Assigned: mfinkle)

Tracking

(Blocks: 1 bug)

15 Branch
Firefox 23
x86_64
Linux
Points:
---

Firefox Tracking Flags

(firefox21+ fixed, firefox22+ fixed, firefox23 fixed)

Details

Attachments

(1 attachment)

Blocks: 856621
(Assignee)

Updated

5 years ago
No longer blocks: 856621
Component: Awesomescreen → General
(Assignee)

Updated

5 years ago
Blocks: 856621
Created attachment 732004 [details] [diff] [review]
patch

This patch moves the cursor execution into the background part of the task. We pass the Map of thumbnails to onPostExecute.

I still get thumbnails appearing with this patch, so I guess it didn't break anything. Nothing bad showing up in logcat either.
Attachment #732004 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 732004 [details] [diff] [review]
patch

Review of attachment 732004 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch. The performance hit is probably coming from the image decoding that was happening on the UI thread i.e. the decodeByteArray() calls.
Attachment #732004 - Flags: review?(lucasr.at.mozilla) → review+

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/72ed3ec3c90b
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Comment on attachment 732004 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: Executing DB code on the main thread leads to ANR hangs and possible DB locks
Testing completed (on m-c, etc.): landed on m-c
Risk to taking this patch (and alternatives if risky): some risk, but it's fairly isolated and a straight forward fix
String or IDL/UUID changes made by this patch: none

I'd like to see this on beta early in the cycle to see if it has any affect on crash stats.
Attachment #732004 - Flags: approval-mozilla-beta?
Attachment #732004 - Flags: approval-mozilla-aurora?

Updated

5 years ago
Attachment #732004 - Flags: approval-mozilla-beta?
Attachment #732004 - Flags: approval-mozilla-beta+
Attachment #732004 - Flags: approval-mozilla-aurora?
Attachment #732004 - Flags: approval-mozilla-aurora+

Updated

5 years ago
status-firefox21: --- → affected
status-firefox22: --- → affected
tracking-firefox21: --- → +
tracking-firefox22: --- → +
https://hg.mozilla.org/releases/mozilla-aurora/rev/2f602c0a84aa
https://hg.mozilla.org/releases/mozilla-beta/rev/5085168d92eb
status-firefox21: affected → fixed
status-firefox22: affected → fixed
status-firefox23: --- → fixed
You need to log in before you can comment on or make changes to this bug.