Closed Bug 856728 Opened 11 years ago Closed 11 years ago

TopSitesView.java executes a DB cursor on the main thread

Categories

(Firefox for Android Graveyard :: General, defect)

15 Branch
x86_64
Linux
defect
Not set
normal

Tracking

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

RESOLVED FIXED
Firefox 23
Tracking Status
firefox21 + fixed
firefox22 + fixed
firefox23 --- fixed

People

(Reporter: mfinkle, Assigned: mfinkle)

References

Details

Attachments

(1 file)

No longer blocks: 856621
Component: Awesomescreen → General
Blocks: 856621
Attached patch patchSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/72ed3ec3c90b
Status: NEW → RESOLVED
Closed: 11 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?
Attachment #732004 - Flags: approval-mozilla-beta?
Attachment #732004 - Flags: approval-mozilla-beta+
Attachment #732004 - Flags: approval-mozilla-aurora?
Attachment #732004 - Flags: approval-mozilla-aurora+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: