New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 857327 link

Starred by 5 users

Issue metadata

Status: ExternalDependency
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature


Participants' hotlists:
GSuite-Priorities


Sign in to add a comment

Expose code cache state

Project Member Reported by pweis@google.com, Jun 28 2018

Issue description

There doesn't seem to be a way currently to tell whether a JS resource was loaded with code cache. We've struggled in the past trying to make sure we don't break any code cache behavior, e.g. when loading scripts in an iframe, async, or via service worker. Having more transparency here would really help sites to make sure they trigger code cache heuristics.

Two potential ways to expose this:
(1) Web API, maybe as additional information with Resource Timing. Browser cache status is already exposed there via transferSize, so this might be a reasonable place. This would allow pages to track and monitor code cache hit rates.
(2) Developer tools. This would help developers understand code cache heuristics, and allow them to maximize hit rates.

 
Cc: falken@chromium.org kozy@chromium.org horo@chromium.org
Iirc (2) is at least already partly implemented, even though not exposed through the devtools protocol (?). See  issue 769166 .
Components: -Blink Platform>DevTools
Status: WontFix (was: Untriaged)
You can look at the runtime call stats in the Performance tab. You will find v8 parse / v8 compile events there. If you don't see them, it means compilation cache was used.

The code responsible for the caching policy is around this line: https://cs.chromium.org/chromium/src/third_party/blink/renderer/bindings/core/v8/v8_code_cache.cc?sq=package:chromium&g=0.
Status: Untriaged (was: WontFix)
We would like this exposed to live pages, not just dev tools, so we can log and correlate with performance data.
Components: -Platform>DevTools Blink>JavaScript
Cc: mythria@chromium.org adamk@chromium.org
Components: -Blink>JavaScript Blink>Storage
Components: -Blink>Storage Blink>PerformanceAPIs>ResourceTiming Blink>Loader
This isn't a web storage API feature.

Can someone managing the Blink>PerformanceAPIs>ResourceTiming component please take a look?
Cc: igrigo...@chromium.org
I'm not sure if Resource Timing (or Web API in general) is good fit for this. The code cache is V8 / Chrome specific concept, and it might not make sense for other browsers.
Labels: Needs-Feedback
We're not going to add something Chrome-specific to the Resource Timing API. I don't know whether it even makes sense there, but I suggest you open an issue at https://w3c.github.io/resource-timing/ to get feedback.
Status: ExternalDependency (was: Untriaged)
Labels: Pri-3

Sign in to add a comment