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

[feature/docs] Document GTS_WAZERO_COMPILATION_CACHE for caching pre-compiled WASM to disk #3233

Open
gmemstr opened this issue Aug 25, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@gmemstr
Copy link

gmemstr commented Aug 25, 2024

Is your feature request related to a problem ?

When starting up the server binary, especially on lower power machines, the precompiling WebAssembly step can take a while, even if the version of the binary remains unchanged.

Describe the solution you'd like.

It may be worthwhile to look at caching the compiled WASM to disk rather than just in memory, which can then be loaded into memory on subsequent starts. This could be to a directory in /tmp to that reboots clear out old versions automatically. A hash/commit/revision tag could be added to the cache file to ensure when upgrading the new version is compiled and placed on disk.

Describe alternatives you've considered.

NONE

Additional context.

No response

@gmemstr gmemstr added the enhancement New feature or request label Aug 25, 2024
@tsmethurst
Copy link
Contributor

You can do this by setting GTS_WAZERO_COMPILATION_CACHE to some directory :) (eg., GTS_WAZERO_COMPILATION_CACHE=~/.cache/wazero. We still need to document that env var.

@tsmethurst tsmethurst changed the title [feature] Cache pre-compiled WASM to disk [feature/docs] Document GTS_WAZERO_COMPILATION_CACHE for caching pre-compiled WASM to disk Aug 25, 2024
@tsmethurst tsmethurst added the documentation Improvements or additions to documentation label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants