Last Comment Bug 721216 - Bitmap compression on main thread causes the tab strip to take a long time to appear
: Bitmap compression on main thread causes the tab strip to take a long time to...
Status: RESOLVED FIXED
[inbound]
: perf
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: unspecified
: ARM Android
: -- normal (vote)
: Firefox 12
Assigned To: Brad Lassey [:blassey] (use needinfo?)
:
Mentors:
: 720361 (view as bug list)
Depends on: 721308
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-25 14:38 PST by Patrick Walton (:pcwalton)
Modified: 2016-07-29 14:21 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed
11+


Attachments
patch (2.32 KB, patch)
2012-01-25 15:36 PST, Brad Lassey [:blassey] (use needinfo?)
pwalton: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Patrick Walton (:pcwalton) 2012-01-25 14:38:14 PST
It can take a few seconds for the tabs to appear when the tab strip button is tapped. This is due to this call stack:

* Bitmap.nativeCompress
* Bitmap.compress
* GeckoApp.getAndProcessThumbnailForTab
* Tabs.refreshThumbnails
* TabsTray.onCreate
Comment 1 Brad Lassey [:blassey] (use needinfo?) 2012-01-25 15:36:51 PST
Created attachment 591638 [details] [diff] [review]
patch
Comment 2 Patrick Walton (:pcwalton) 2012-01-25 18:56:11 PST
This helps significantly. It still takes too long to open the tab strip (about a second), and switching tabs takes a long time as well, but those are separate bugs.
Comment 3 Patrick Walton (:pcwalton) 2012-01-25 18:58:04 PST
Comment on attachment 591638 [details] [diff] [review]
patch

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

r=me.

But can we put image decoding in a background thread so that it doesn't block the UI at all?

::: mobile/android/base/Tabs.java
@@ +221,5 @@
> +        GeckoAppShell.getHandler().post(new Runnable() {
> +            public void run() {
> +                Iterator<Tab> iterator = tabs.values().iterator();
> +                while (iterator.hasNext())
> +                    GeckoApp.mAppContext.getAndProcessThumbnailForTab(iterator.next());

nit: {}
Comment 4 Brad Lassey [:blassey] (use needinfo?) 2012-01-25 23:54:28 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/7f26e362a9f7
Comment 5 Ed Morley [:emorley] 2012-01-26 04:26:51 PST
https://hg.mozilla.org/mozilla-central/rev/7f26e362a9f7
Comment 6 Brad Lassey [:blassey] (use needinfo?) 2012-01-26 10:26:06 PST
*** Bug 720361 has been marked as a duplicate of this bug. ***
Comment 7 Brad Lassey [:blassey] (use needinfo?) 2012-01-26 20:38:19 PST
Comment on attachment 591638 [details] [diff] [review]
patch

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Tab menu opens slowly
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky):
This patch depends on bug 721308 since it is possible to cause a crash with it alone. With both patches this is pretty safe.
Comment 8 Alex Keybl [:akeybl] 2012-01-27 16:33:31 PST
Comment on attachment 591638 [details] [diff] [review]
patch

[Triage Comment]
Mobile only - approved for Aurora.
Comment 9 Brad Lassey [:blassey] (use needinfo?) 2012-01-30 11:36:14 PST
https://hg.mozilla.org/releases/mozilla-aurora/rev/75bb8908cef0

Note You need to log in before you can comment on or make changes to this bug.