Closed Bug 961954 Opened 11 years ago Closed 11 years ago

GeckoApp.onCreatePanelMenu is called during startup

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 30

People

(Reporter: mfinkle, Assigned: wesj)

References

Details

Attachments

(1 file, 1 obsolete file)

GeckoApp.onCreatePanelMenu is called from GeckoApp.initialize() for SDK >= 11 here: http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/GeckoApp.java#1432 GeckoApp.onCreatePanelMenu accounts for 8.2% (194ms) of startup on my Galaxy Nexus. We moved the call to initialize() for some reason in bug 886528. Maybe we went too far.
Might be worth just testing this: stuff it last in the background thread initializers, and fast-init it when loading the menu. Where's most of the time coming from? Looking up views by ID?
Hardware: ARM → All
It calls BrowserApp.onCreateOptionsMenu, which takes most of it's time in GeckoMenuInflater.inflate -> GeckoMenuInflater.parseMenu
Attached patch Patch v1 (obsolete) (deleted) — Splinter Review
This just removes these calls. I still want to make sure that we invalidate the menu at some point, so I moved that into onMenuOpened. I also moved the event handlers into BrowserApp since they're not used by any one else (Ideally we'd move all this code into the menu code, but that's a bigger refactor).
Attachment #8369744 - Flags: review?(mark.finkle)
Comment on attachment 8369744 [details] [diff] [review] Patch v1 I'd like you to test a few situations: * Make sure a menu item correctly toggles (Bookmark and Request Desktop, for example) * Test on Gingerbread, ICS and newer phones, since invalidateOptionsMenu is a 11+ API and menus worked differently before it.
Attachment #8369744 - Flags: review?(mark.finkle) → review+
Attached patch Patch v2 (deleted) — Splinter Review
Grr. Forgot to test on a device with a software menu button. Or... didn't realize that they were different. Pushed this to try: https://tbpl.mozilla.org/?tree=Try&rev=dea89e3ff9c0
Attachment #8369744 - Attachment is obsolete: true
Attachment #8370370 - Flags: review?(mark.finkle)
Attachment #8370370 - Flags: review?(mark.finkle) → review+
Assignee: nobody → wjohnston
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
GeckoApp.onCreatePanelMenu is no longer in the startup profile.
Let this bake a few more days, but we should consider moving this to Aurora. It's still early in the cycle.
This might have caused regression bug 972327. Please convince me otherwise.
Nope. It almost certainly caused that.
Depends on: 972327
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: