Enable the JavaScript Start-up Bytecode Cache by default

RESOLVED FIXED in Firefox 58

Status

()

enhancement
P2
normal
RESOLVED FIXED
2 years ago
11 months ago

People

(Reporter: nbp, Assigned: nbp)

Tracking

({feature})

unspecified
mozilla58
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(relnote-firefox 58+, firefox57 disabled, firefox58 fixed)

Details

Assignee

Description

2 years ago
No description provided.
Priority: -- → P2

Comment 2

2 years ago
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/929b9943b4fc
Enable the JavaScript Start-up Bytecode Cache. r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/929b9943b4fc
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Assignee

Comment 5

2 years ago
Telemetry alerts[1] are reporting that the JSBC is enabled and working. Latest telemetry data[2] show that 18% of the script tags are loaded from the alternate data cache (i.e. in bytecode format) and 28% are loaded in source format from the network or from the network cache.

The expected result is that it will progressively converge to become ~23% for both column, at least based on the fetch_count results and the current heuristics in place.

[1] http://alerts.telemetry.mozilla.org/index.html#/detectors/1/alerts/?from=2017-11-02&to=2017-11-02&metrics-filter=

[2] https://telemetry.mozilla.org/new-pipeline/dist.html#!cumulative=0&end_date=2017-11-05&keys=__none__!__none__!__none__&max_channel_version=nightly%252F58&measure=DOM_SCRIPT_LOADING_SOURCE&min_channel_version=null&processType=*&product=Firefox&sanitize=1&sort_keys=submissions&start_date=2017-11-04&table=0&trim=1&use_submission_date=0
Release Note Request (optional, but appreciated)
[Why is this notable]: New important feature
[Affects Firefox for Android]: dunno?
[Suggested wording]: JavaScript Start-up Bytecode Cache introduced
[Links (documentation, blog post, etc)]: Do you have any doc Nicolas?
relnote-firefox: --- → ?
Flags: needinfo?(nicolas.b.pierron)

Comment 7

2 years ago
It'd be useful to know as a user what this means. Does it affect browser startup? Page load? JS speed?

The Firefox Nightly account is tweeting about this too and lacks context there also:

https://twitter.com/FirefoxNightly/status/927581681661480961
Assignee

Comment 8

2 years ago
(In reply to Sylvestre Ledru [:sylvestre] from comment #6)
> Release Note Request (optional, but appreciated)
> [Why is this notable]:

The detail is in Bug 900784 and its dependent bugs. To make it short:
 1. This removes on average 43 ms of every page load. (while being effective on ~50% of the page loads)
 2. Talos benchmarks reports a 15% improvements on google.com.
 3. On a personal Window computer with PGO, my personal facebook page load improved from 641ms to 522ms.

> [Affects Firefox for Android]:

This should, I have no telemetry data yet to confirm that.

> [Suggested wording]: JavaScript Start-up Bytecode Cache introduced

 * JavaScript: Aims at removing JavaScript parsing time.
 * Start-up: Captures the beginning of the JavaScript execution of *web-pages*, and record only the parser result of functions were used during the load-time of web-pages.
 * Bytecode: Stores the parsed function as byte-code.
 * Cache: Stores the parsed function in the network cache.

> [Links (documentation, blog post, etc)]: Do you have any doc Nicolas?

https://groups.google.com/forum/#!msg/mozilla.dev.platform/4u6EsaDC7kY/1TxDr3-BAgAJ


(In reply to mlissner from comment #7)
> It'd be useful to know as a user what this means. Does it affect browser
> startup? Page load? JS speed?

It does not affect browser start-up.
It improves the average page-load by 43 ms.
It does improves the JS speed, as some functions are parsed sequentially during the page-load.
Flags: needinfo?(nicolas.b.pierron)
> https://groups.google.com/forum/#!msg/mozilla.dev.platform/4u6EsaDC7kY/
> 1TxDr3-BAgAJ

are you planning to write a blog post or some doc?
We cannot link to a thread in a ML from the release notes
Assignee: nobody → nicolas.b.pierron
Nicolas, will you or someone from your team provide a short release note description? Since this is not getting backed out, it is probably stable enough to be added to at least 59 Nightly release notes. Thanks
Flags: needinfo?(nicolas.b.pierron)
Assignee

Comment 11

2 years ago
Release Note Request (optional, but appreciated)
[Why is this notable]: 5% - 15% page load on some well known websites.
[Affects Firefox for Android]: (supposed to, but no telemetry data to confirm)
[Suggested wording]: Optimize page load by caching JavaScript internal representation.
[Links (documentation, blog post, etc)]: Currently under review by PR, to be published on the JavaScript blog:
https://docs.google.com/a/mozilla.com/document/d/1Sf9YKx52Be0_p0yPmKMDwBEzhwUGTHg-cvAEpVLRKik/edit?usp=sharing
Flags: needinfo?(nicolas.b.pierron)
Assignee

Comment 12

2 years ago
(In reply to Nicolas B. Pierron [:nbp] from comment #11)
> [Links (documentation, blog post, etc)]: Currently under review by PR, to be
> published on the JavaScript blog:

Blog post: http://blog.mozilla.org/javascript/2017/12/12/javascript-startup-bytecode-cache/
(it would be published on Tuesday)

Updated

a year ago
Depends on: 1426069
Has been added to the release notes with a link to the blog post!

Merci beaucoup Nicolas!
Keywords: feature
You need to log in before you can comment on or make changes to this bug.