Hi Everyone,
I'm trying to figure out why chromium is not using script compilation cache when the script loaded from a page served by file:// (and not at all in an Android WebView)
I am testing with this html:
<html><head></head>
<body>
</body></html>
When serving this page over file:// => performance profiler reports:
Streamed: true
Compilation cache status: script not eligible
When serving over http://
Streamed: false: script has code-cache available
Compilation cache status: script loaded from cache
Compilation cache: size127 kB
Having observed this behaviour with the Chromium profiling tool, I would like to trace it back in the Chromium source code.
It's the first time I'm looking at Chromium code, and it's a bit overwhelming :-)
I'm thinking the ScriptCacheConsumer would be involved, but a breakpoint in it's constructor doesn't seem to get hit when loading the page over http.
The ScriptStreamer::ScriptDecoder DidReveiveData triggers on a breakpoint, even when the compilation cache is used.
We have a pretty large javascript app which we also run on Android WebView, we could have a huge benefit from compiled script cache. On Android however, the script cache isn't always working on pages served over https either (script not eligible).
So I'm actually searching for the code that decides wether a script is eligible or not for the code caching.
Could anyone point me in the right direction?
kind regards,
Mark