Closed
Bug 1173379
Opened 9 years ago
Closed 9 years ago
More aggressive delay-initialization
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox41 fixed)
RESOLVED
FIXED
Firefox 41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: jchen, Assigned: jchen)
References
Details
Attachments
(3 files, 1 obsolete file)
2.75 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
1.37 KB,
patch
|
mossop
:
review+
|
Details | Diff | Splinter Review |
9.81 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
Bug 1166452 added a DelayedInit.jsm module that we can use to delay-load even moar things.
Assignee | ||
Comment 1•9 years ago
|
||
Add more things to be delay-loaded. In particular, we can delay initializing the context menu items until NativeWindow.contextmenu is accessed.
Attachment #8621268 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 2•9 years ago
|
||
We can lazy-load AndroidLog.jsm until dump() is used, and by switching some console.log() calls to dump() calls, we can delay loading the console service.
Attachment #8621270 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 3•9 years ago
|
||
Since the console object is not used right away, we can load it lazily.
Attachment #8621271 -
Flags: review?(dtownsend)
Updated•9 years ago
|
Attachment #8621271 -
Flags: review?(dtownsend) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8621268 [details] [diff] [review] Delay-init more things on startup (v1) General comment: I'm not a big fan of pulling a bunch of initialization code out of the contextual location and putting it all in a single place. One example of this is pulling CharacterEncoding.sendState out of the CharacterEncoding object. Why not keep CharacterEncoding.sendState in the CharacterEncoding.init() method, and move the CharacterEncoding.init method into the InitLater section? The "click" event listeners also seem to want a better method of invocation. Maybe we could create a BrowserDeck helper like we do for nsIObserver notifications and message manager messages? That might be more work than you want to do for now, so how about just getting the CharacterEncoding object cleaned up a little?
Attachment #8621268 -
Flags: review?(mark.finkle) → review-
Updated•9 years ago
|
Attachment #8621270 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #4) > Comment on attachment 8621268 [details] [diff] [review] > Delay-init more things on startup (v1) > > General comment: I'm not a big fan of pulling a bunch of initialization code > out of the contextual location and putting it all in a single place. Yeah that makes sense. > One example of this is pulling CharacterEncoding.sendState out of the > CharacterEncoding object. Why not keep CharacterEncoding.sendState in the > CharacterEncoding.init() method, and move the CharacterEncoding.init method > into the InitLater section? I kept the original CharacterEncoding.init call because it registers observers, and (I think) we want that to happen before the Gecko:Ready event. In the new patch, I moved the InitLater(CharacterEncoding.sendState) call to inside CharacterEncoding.init. I also moved the click events back to their original location, with InitLater wrapped around them.
Attachment #8621268 -
Attachment is obsolete: true
Attachment #8622698 -
Flags: review?(mark.finkle)
Comment 6•9 years ago
|
||
Comment on attachment 8622698 [details] [diff] [review] Delay-init more things on startup (v2) Thanks
Attachment #8622698 -
Flags: review?(mark.finkle) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/9905e191083a https://hg.mozilla.org/integration/mozilla-inbound/rev/cf6ee89903ae https://hg.mozilla.org/integration/mozilla-inbound/rev/5adf4fc6a628
Comment 8•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9905e191083a https://hg.mozilla.org/mozilla-central/rev/cf6ee89903ae https://hg.mozilla.org/mozilla-central/rev/5adf4fc6a628
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•