denoland / deno

A modern runtime for JavaScript and TypeScript.

Home Page:https://deno.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

V8 code cache: node_modules cache doesn't work on Lambda

igorzi opened this issue · comments

For node_modules we use timestamps instead of hashes, and on Lambda fs the timestamp resolution is seconds (not milliseconds). If the docker image has time resolution of milliseconds that will always cause cache misses.

We might want to consider just computing a hash of the source file instead of using timestamps. It's super fast to do.

Also, the current reading from the sqlite cache to get a hash might be racy now after #23634 -- we probably just want to compute a hash all the time

Will benchmark with computed hashes