Expose code cache state |
|||||||||||
Issue descriptionThere 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.
,
Jun 30 2018
,
Aug 27
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.
,
Sep 4
We would like this exposed to live pages, not just dev tools, so we can log and correlate with performance data.
,
Sep 7
,
Sep 13
,
Sep 27
This isn't a web storage API feature. Can someone managing the Blink>PerformanceAPIs>ResourceTiming component please take a look?
,
Sep 28
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.
,
Sep 28
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.
,
Oct 12
,
Dec 4
,
Jan 11
This was discussed in yesterday's WG meeting: https://docs.google.com/document/u/1/d/e/2PACX-1vRT4wJUFKzJKx2VjDIWc19g-tdIzkAnbLsS21dw03yyWQz8NBoGsgEXfTzGIme-0DAK7SmV_L4RDIV-/pub |
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by yangguo@chromium.org
, Jun 28 2018