deno icon indicating copy to clipboard operation
deno copied to clipboard

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

Open igorzi opened this issue 1 year ago • 3 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.

igorzi avatar May 20 '24 19:05 igorzi

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

dsherret avatar May 22 '24 00:05 dsherret

Also, the current reading from the sqlite cache to get a hash might be racy now after https://github.com/denoland/deno/pull/23634 -- we probably just want to compute a hash all the time

dsherret avatar May 22 '24 00:05 dsherret

Will benchmark with computed hashes

igorzi avatar May 22 '24 00:05 igorzi