Closed Bug 1369460 Opened 7 years ago Closed 7 years ago

AsyncPrefs.jsm should be imported lazily from nsBrowserGlue.js

Categories

(Toolkit :: General, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Iteration:
56.3 - Jul 24
Tracking Status
firefox56 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 1 open bug)

Details

(Whiteboard: [photon-performance])

Attachments

(1 file)

Like bug 1358921 did for lots of modules imported into nsBrowserGlue.js, AsyncPrefs.jsm can be imported lazily the first time a relevant message is received.
Attached patch PatchSplinter Review
Attachment #8885863 - Flags: review?(mconley)
Assignee: nobody → florian
Status: NEW → ASSIGNED
Comment on attachment 8885863 [details] [diff] [review] Patch Also flagging snorp (per rnewman's suggestion in #mobile) for the mobile/ changes.
Attachment #8885863 - Flags: review?(snorp)
Comment on attachment 8885863 [details] [diff] [review] Patch Review of attachment 8885863 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/components/geckoview/GeckoViewPrompt.js @@ +41,5 @@ > } > case "profile-after-change": { > // ContentPrefServiceParent is needed for e10s file picker. > ContentPrefServiceParent.init(); > + // AsyncPrefs is needed for reader mode. Is reader mode the only thing that uses this? I would prefer to only initialize it once reader mode needs it. Putting it here means it's in the critical path for startup, but I guess it was in browser.js anyway.
Attachment #8885863 - Flags: review?(snorp) → review+
Comment on attachment 8885863 [details] [diff] [review] Patch Review of attachment 8885863 [details] [diff] [review]: ----------------------------------------------------------------- Thanks! ::: browser/base/content/test/performance/browser_startup.js @@ +103,5 @@ > // and loaded lazily when used for the first time by the user should > // be blacklisted here. > "before becoming idle": {blacklist: { > modules: new Set([ > + "resource://gre/modules/AsyncPrefs.jsm", Hooray! ::: browser/components/nsBrowserGlue.js @@ -141,5 @@ > // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN ContentPrefServiceParent.init > "ContentPrefs:FunctionCall": ["ContentPrefServiceParent"], > "ContentPrefs:AddObserverForName": ["ContentPrefServiceParent"], > "ContentPrefs:RemoveObserverForName": ["ContentPrefServiceParent"], > - // PLEASE KEEP THIS LIST IN SYNC WITH THE LISTENERS ADDED IN ContentPrefServiceParent.init A warning was placed above and below this block. Perhaps we should keep (and follow) that tactic to avoid screwing this ordering up down the line?
Attachment #8885863 - Flags: review?(mconley) → review+
Pushed by florian@queze.net: https://hg.mozilla.org/integration/mozilla-inbound/rev/25e361f978f5 AsyncPrefs.jsm should be imported lazily from nsBrowserGlue.js, r=mconley,snorp.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Hi Florian, should I add bug 1369460 to the Performance MVP?
Flags: needinfo?(florian)
(In reply to Marco Mucci [:MarcoM] from comment #7) > Hi Florian, should I add bug 1369460 to the Performance MVP? Yes
Flags: needinfo?(florian) → qe-verify-
Whiteboard: [photon-performance]
Iteration: --- → 56.3 - Jul 24
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: