Closed
Bug 1358648
Opened 8 years ago
Closed 8 years ago
Weave.js is expensive during early startup due to importing resource://services-sync/util.js
Categories
(Firefox :: Sync, defect, P1)
Firefox
Sync
Tracking
()
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: florian, Assigned: eoger)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [photon-performance])
Attachments
(3 files)
About 4% of the time before the first browser window is shown is spent in http://searchfox.org/mozilla-central/source/services/sync/Weave.js and almost all of the time spent there is importing resource://services-sync/util.js
I think this should be a lazy getter.
Here it is on a Mac startup profile: https://perfht.ml/2pNYWEq
Equivalent Windows profile: https://perfht.ml/2pO7v1W
Reporter | ||
Comment 1•8 years ago
|
||
Actually, Promise.jsm is visible in the profile too, so it would be nice to stop using it there and use a native promise instead.
FileUtils.jsm should also become a lazy getter... or maybe even better import it right before its only use in the file.
Updated•8 years ago
|
Flags: qe-verify?
Priority: -- → P2
Comment 2•8 years ago
|
||
There's a good chance that bug 1353571 will fix this.
Reporter | ||
Comment 3•8 years ago
|
||
(In reply to Mark Hammond [:markh] from comment #2)
> There's a good chance that bug 1353571 will fix this.
Ok, the current patches there don't seem to touch the Weave.js file, but as long as it gets fixed, I don't really care in which bug we do it :-).
Depends on: 1353571
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 8•8 years ago
|
||
Wish I could have done more and remove completely that Svc abomination, but it's a bit more work.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → eoger
Status: NEW → ASSIGNED
Comment 9•8 years ago
|
||
mozreview-review |
Comment on attachment 8863924 [details]
Bug 1358648 part 1 - Clean-up some Weave imports.
https://reviewboard.mozilla.org/r/135652/#review138674
::: services/common/utils.js:14
(Diff revision 1)
> Cu.import("resource://gre/modules/XPCOMUtils.jsm");
> -Cu.import("resource://gre/modules/osfile.jsm")
> Cu.import("resource://gre/modules/Log.jsm");
> +XPCOMUtils.defineLazyModuleGetter(this, "OS",
> + "resource://gre/modules/osfile.jsm");
> +XPCOMUtils.defineLazyModuleGetter(this, "Promise",
I believe we can just kill use of Promise.jsm and DOM promises should just magically work.
Attachment #8863924 -
Flags: review?(markh) → review+
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8863925 [details]
Bug 1358648 part 2 - Remove util.js Svc.{DefaultPrefs,Session,Idle, FormHistory} and Str.
https://reviewboard.mozilla.org/r/135654/#review138680
Attachment #8863925 -
Flags: review?(markh) → review+
Comment 11•8 years ago
|
||
mozreview-review |
Comment on attachment 8863926 [details]
Bug 1358648 part 3 - Remove Async, Services and XPCOMUtils from util.js.
https://reviewboard.mozilla.org/r/135656/#review138690
Attachment #8863926 -
Flags: review?(markh) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 18•8 years ago
|
||
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8d0b6d84a8e9
part 1 - Clean-up some Weave imports. r=markh
https://hg.mozilla.org/integration/autoland/rev/dff6d3f923d7
part 2 - Remove util.js Svc.{DefaultPrefs,Session,Idle, FormHistory} and Str. r=markh
https://hg.mozilla.org/integration/autoland/rev/9e6ae4133c2e
part 3 - Remove Async, Services and XPCOMUtils from util.js. r=markh
Updated•8 years ago
|
Priority: P2 → P1
Comment 19•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8d0b6d84a8e9
https://hg.mozilla.org/mozilla-central/rev/dff6d3f923d7
https://hg.mozilla.org/mozilla-central/rev/9e6ae4133c2e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
Updated•8 years ago
|
Iteration: --- → 55.5 - May 15
Reporter | ||
Updated•8 years ago
|
Blocks: photon-startup
Reporter | ||
Updated•8 years ago
|
No longer blocks: photon-performance-triage
Reporter | ||
Updated•8 years ago
|
Blocks: photon-performance-triage
Updated•8 years ago
|
Flags: qe-verify? → qe-verify-
You need to log in
before you can comment on or make changes to this bug.
Description
•