Closed Bug 705725 Opened 14 years ago Closed 14 years ago

Move preferences getting out of the startup path

Categories

(Firefox for Android Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(firefox11 verified, firefox12 verified, firefox13 verified, fennec11+)

VERIFIED FIXED
Tracking Status
firefox11 --- verified
firefox12 --- verified
firefox13 --- verified
fennec 11+ ---

People

(Reporter: dougt, Assigned: bnicholson)

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

When profiling, i saw that we fetch preferences from gecko during startup. This is so that the preferences menu doesn't have to block on waiting for any gecko preferences. In this patch, i simply move it out of the startup path by delaying the execution for 5 seconds.
Attached patch v.1 (obsolete) — — Splinter Review
Attachment #577294 - Flags: review?(blassey.bugs)
Comment on attachment 577294 [details] [diff] [review] v.1 5 secs seems arbitrarily long, considering we don't even attempt to load prefs until gecko is loaded and the <browser> is created. I don't think we should be making delayed loads like this unless we know it helps. I'm not interested in gaming the startup metrics.
Attachment #577294 - Flags: review?(blassey.bugs) → review-
Instead, we decided to switch back to the old method of loading the preferences from gecko when the preferences view is created. We need to figure out how to keep bug 701826 from regressing though. We need to show a throbber or something while the preferences are waiting to load from gecko. This approach does remove the pref loading from the startup path.
Assignee: doug.turner → bnicholson
Attached patch patch v2 — — Splinter Review
This is mostly a backout of bug 701826. I've greyed out the preferences before they're loaded to make it a bit cleaner. On a Droid Pro, the loading of the preferences page is usually instantaneous; I notice a small delay at times, but only when loading a page. For an exaggerated example, you can open the preferences screen while this page is looping: http://thebnich.com/loop.html
Attachment #577294 - Attachment is obsolete: true
Attachment #577795 - Flags: review?(doug.turner)
Test case attached.
Keywords: testcase
Attachment #577796 - Attachment description: test case → test case - DO NOT CLICK ON ME
Comment on attachment 577795 [details] [diff] [review] patch v2 * Can we make the PreferenceScreen enabled="false" ? Instead of each category. >+ sIsGeckoReady = true; >+ mMainHandler.post(new Runnable() { >+ public void run() { >+ if (sMenu != null) >+ sMenu.findItem(R.id.preferences).setEnabled(true); >+ } >+ }); > setLaunchState(GeckoApp.LaunchState.GeckoRunning); The mMainHandler code block is indented 1 space too much
Attachment #577795 - Flags: review?(doug.turner) → review+
Priority: -- → P2
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
tracking-fennec: --- → 11+
Verified fixed on: Firefox 13.0a1 (2012-02-20) 20120220031231 http://hg.mozilla.org/mozilla-central/rev/561771f01881 Firefox 12.0a2 (2012-02-20) 20120220042008 http://hg.mozilla.org/releases/mozilla-aurora/rev/dfb7c3567c49 Firefox 11.0 (2012-02-19) 20120219151859 http://hg.mozilla.org/releases/mozilla-beta/rev/6df75f4d5ccc -- Device: Motorola Droid PRO OS: Android 2.3.3
Status: RESOLVED → VERIFIED
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: