59 bytes, text/x-review-board-request
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 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+
ping, should we land this?
I'll land. I just decided to wait until after the merge, and it's ended up in my backlog in the mean time.
https://hg.mozilla.org/integration/mozilla-inbound/rev/b80466887686fbefe5a67aebc86f6f4aaf5feac8 Bug 1384714: Use subscript loader to load browser.xul scripts. r=Mossop
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
You need to log in before you can comment on or make changes to this bug.