In Chrome, any JavaScript files in a service worker cache are bytecode-cached automatically.
This means there is 0 parse + compile cost for them on repeat visits.
https://v8.dev/blog/code-caching-for-devs#use-service-worker-caches …
You’re conflating multiple separate optimizations here. Closure Compiler definitely helps @v8js and other engines scan and parse code more efficiently. See https://v8.dev/blog/scanner#conclusion ….
-
-
Agree - but once v8 has the bytecode cached, it's likely your code will re-load and run (almost) equally fast, regardless of whether you had used Closure? I had been seeing Closure as a way to also rerun cached code faster; but v8's caching is way ahead of me!
-
I still use minification, but had tried Closure advanced to squeeze a little more out. I'm OK with first parse being slightly slower, and knowing that 2nd, 3rd execution are using the bytecode, means I'm happy to stick with standard minification for now..
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.