Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
igorzi opened this issue May 20, 2024 · 3 comments · Fixed by #23966
Closed

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

igorzi opened this issue May 20, 2024 · 3 comments · Fixed by #23966
Assignees
Labels
perf performance related

Comments

@igorzi
Copy link

igorzi commented May 20, 2024

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 igorzi self-assigned this May 20, 2024
@ry ry added the perf performance related label May 20, 2024
@dsherret
Copy link
Member

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

@dsherret
Copy link
Member

dsherret commented May 22, 2024

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

@igorzi
Copy link
Author

igorzi commented May 22, 2024

Will benchmark with computed hashes

dsherret added a commit that referenced this issue May 24, 2024
* denoland/deno_core#752
* denoland/deno_core#753

Did benchmarking on this and it's slightly faster (couple ms) or equal
to in performance as main.

Closes #23904
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf performance related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants