Hacker News new | past | comments | ask | show | jobs | submit login

I suppose I could look this up, but maybe someone here knows. Is cached JS re-parsed on every page load or is the AST (or some sort of bytecode) stored as a blob on disk for faster loads from cache?



It looks like you can leverage this:

https://v8.dev/blog/improved-code-caching

using this:

https://www.npmjs.com/package/v8-compile-cache

Or see the options with "cache" in their name, here: https://nodejs.org/api/vm.html#vm_new_vm_script_code_options


Thanks! Looks like the first link answers my question.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: