Some pointers regarding Compilation Script Cache

236 views
Skip to first unread message

Mark Meeus

unread,
Jun 3, 2022, 6:38:47 PM6/3/22
to Chromium-dev
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>
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
</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

Egor Pasko

unread,
Jun 27, 2022, 11:27:11 AM6/27/22
to mark....@gmail.com, Chromium-dev, v8-...@chromium.org

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9fe77bd9-f4da-4b1d-a9ea-f5d701d72b6en%40chromium.org.

Egor Pasko

unread,
Jun 27, 2022, 11:29:43 AM6/27/22
to mark....@gmail.com, Chromium-dev, v8-...@googlegroups.com
+v8-dev (take 2)

On Sat, Jun 4, 2022 at 12:37 AM Mark Meeus <mark....@gmail.com> wrote:
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9fe77bd9-f4da-4b1d-a9ea-f5d701d72b6en%40chromium.org.


--
Egor Pasko
Reply all
Reply to author
Forward
0 new messages