Closed Bug 726732 Opened 12 years ago Closed 12 years ago

Opening Settings is slow

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: aaronmt, Assigned: sriram)

Details

(Keywords: perf)

Attachments

(1 file)

HTC Nexus One (Android 2.3.4) - Nightly (02/13)

* Displayed org.mozilla.fennec/org.mozilla.gecko.GeckoPreferences: +2s410ms
* Displayed org.mozilla.fennec/org.mozilla.gecko.GeckoPreferences: +2s171ms
* Displayed org.mozilla.fennec/org.mozilla.gecko.GeckoPreferences: +2s252ms

HTC Nexus One (Android 2.3.4) - Stock (02/13)

* Displayed com.android.browser/.BrowserPreferencesPage: +390ms
* Displayed com.android.browser/.BrowserPreferencesPage: +415ms
* Displayed com.android.browser/.BrowserPreferencesPage: +382ms


--
HTC Nexus One (Android 2.3.4)
Nightly (02/13)
Mozilla/5.0 (Android; Mobile; rv:13.0a1) Gecko/13.0a1 Firefox/13.0a1
Attached patch WIPSplinter Review
Though everything is running on the UI thread, this pushes the initial UI for the settings screen faster, and then sends event to Gecko. On getting the results from Gecko, it refreshes it. This tries to keep onCreate() smaller.

There is a performance win of around 100ms. I am not sure how it would work on Nexus One though.
Attachment #596779 - Flags: review?(mark.finkle)
With Sriram's patch (tested in #mobile)

HTC Nexus One (Android 2.3.4) --

* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s275ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s153ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s133ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s117ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s64ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s109ms
Comment on attachment 596779 [details] [diff] [review]
WIP

Looks OK to me. Brian has worked in this code a bit too, so let's see if he finds any issues.
Attachment #596779 - Flags: review?(mark.finkle)
Attachment #596779 - Flags: review?(bnicholson)
Attachment #596779 - Flags: review+
Attachment #596779 - Flags: review?(bnicholson) → review+
As per documentatio of android for onWindowFocusChanged(), 
"Called when the current Window of the activity gains or loses focus. This is the best indicator of whether this activity is visible to the user."
http://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged%28boolean%29

I would like to move the code in onResume() to onWindowFocusChanged(). We get performance win of 200ms over onResume() on Nexus One (one of the crappiest phones today).

Should I post a new patch for the same?
Sriram gave me another build in #mobile

HTC Nexus One (Android 2.3.4) --

* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s93ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s181ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s169ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s162ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s66ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s43ms
* Displayed org.mozilla.fennec_sriramramasubramanian/org.mozilla.gecko.GeckoPreferences: +1s64ms
http://hg.mozilla.org/integration/mozilla-inbound/rev/40d26a40e768

pushed with changing onResume() to onWindowFocusChanged() for more optimization.
https://hg.mozilla.org/mozilla-central/rev/40d26a40e768
Assignee: nobody → sriram
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
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: