Closed
Bug 1384714
Opened 7 years ago
Closed 7 years ago
Use subscript loader to load browser.xul scripts
Categories
(Firefox :: General, enhancement)
Firefox
General
Tracking
()
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
There's a lot of overhead to loading scripts from <script> tags in browser.xul. They're loaded asynchronously, and can't begin loading until after we begin loading browser.xul. They're loaded using off-main-thread compilation, which means we need to create and merge a new JS zone for each script we load that way. They don't benefit from the startup cache at all. If we load those scripts using the subscript loader, they're loaded from the preloader cache, and begin loading as early as possible. And they're all loaded into a single off-thread zone, which means there are less zones to create and merge. From a quick test, this seems to save about 20-40ms on Windows ts_paint talos runs. The main downside is that subscript loader scripts don't benefit from lazy parsing, so we might wind up increasing memory usage if most of the functions in those scripts aren't used very often. But we should hopefully be able to fix that by migrating more browser JS to lazy loading.
Comment hidden (mozreview-request) |
Updated•7 years ago
|
Whiteboard: [qf] → [qf:p1]
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8890539 [details] Bug 1384714: Use subscript loader to load browser.xul scripts. https://reviewboard.mozilla.org/r/161676/#review167598
Attachment #8890539 -
Flags: review?(dtownsend) → review+
Assignee | ||
Comment 4•7 years ago
|
||
I'll land. I just decided to wait until after the merge, and it's ended up in my backlog in the mean time.
Flags: needinfo?(kmaglione+bmo)
Assignee | ||
Comment 5•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b80466887686fbefe5a67aebc86f6f4aaf5feac8 Bug 1384714: Use subscript loader to load browser.xul scripts. r=Mossop
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b80466887686
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Comment 7•7 years ago
|
||
I see a perf improvement: == Change summary for alert #9098 (as of August 26 2017 19:16 UTC) == Improvements: 5% tart summary windows10-64 opt e10s 6.17 -> 5.84 For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=9098
Updated•3 years ago
|
Performance Impact: --- → P1
Whiteboard: [qf:p1]
You need to log in
before you can comment on or make changes to this bug.
Description
•