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

⭐ feat: enable on-disk compilation cache by default #35

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

gaukas
Copy link
Contributor

@gaukas gaukas commented Jan 18, 2024

To improve the bootstrapping speed, which has become a major overhead, we will cache the compiled WebAssembly module. Given that it is usually the case that every program importing WATER will be only using one or few WebAssembly modules, an in-memory cache plus an on-disk cache should suffice.

This also prevents a possible bug where if the runtime is reused to compile the same WebAssembly module for multiple times and the first one is closed after the latter ones are built but before (functions from) them are getting called, an error will be caused due to the cache is missing (deleted when the first instance is closed).

Close #34.

Copy link
Member

@erikziyunchi erikziyunchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gaukas gaukas merged commit 336c557 into master Jan 18, 2024
15 checks passed
@gaukas gaukas deleted the gaukas/enable-compilation-cache branch January 23, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

performance: use wazero.CompilationCache across wazero.Runtime for faster compilation
2 participants