GeckoApp.onCreatePanelMenu is called during startup

RESOLVED FIXED in Firefox 30



Firefox for Android
4 years ago
2 years ago


(Reporter: mfinkle, Assigned: wesj)


(Blocks: 1 bug)

Firefox 30
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)

GeckoApp.onCreatePanelMenu is called from GeckoApp.initialize() for SDK >= 11 here:

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

Comment 3

4 years ago
Created attachment 8369744 [details] [diff] [review]
Patch v1

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+

Comment 7

4 years ago
Created attachment 8370370 [details] [diff] [review]
Patch v2

Grr. Forgot to test on a device with a software menu button. Or... didn't realize that they were different. Pushed this to try:
Attachment #8369744 - Attachment is obsolete: true
Attachment #8370370 - Flags: review?(mark.finkle)


4 years ago
Attachment #8370370 - Flags: review?(mark.finkle) → review+
Assignee: nobody → wjohnston
Last Resolved: 4 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.

Comment 13

4 years ago
Nope. It almost certainly caused that.
Depends on: 972327
You need to log in before you can comment on or make changes to this bug.