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

Use code cache in deno compile #26502

Closed
dsherret opened this issue Oct 24, 2024 · 1 comment · Fixed by #26528
Closed

Use code cache in deno compile #26502

dsherret opened this issue Oct 24, 2024 · 1 comment · Fixed by #26528
Labels
compile related to the `deno compile` feature perf performance related

Comments

@dsherret
Copy link
Member

dsherret commented Oct 24, 2024

It seems it's not being used. We should investigate creating it lazily probably in a temp directory. I don't think we should use an sqlite database for this, but instead a more efficient append-only custom database.

Considerations:

  1. Different processes running the same binary could be updating the code cache at the same time.
  2. The cache could be updated at any time via a dynamic import.
  3. We want to minimize memory usage.
  4. Data corruption.
@dsherret dsherret added perf performance related compile related to the `deno compile` feature labels Oct 24, 2024
@dsherret
Copy link
Member Author

dsherret commented Oct 24, 2024

Actually, what we could do here instead is just serialize the code cache of the modules during initial loading to a single file and keep dynamic imports dynamic. That would greatly simplify things and we could limit it to modules found in the binary so that we don't need to do any hashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile related to the `deno compile` feature perf performance related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant