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

WASIX: Map mounted /bin binaries to commands to avoid re-hashing #5416

Open
theduke opened this issue Feb 19, 2025 · 0 comments
Open

WASIX: Map mounted /bin binaries to commands to avoid re-hashing #5416

theduke opened this issue Feb 19, 2025 · 0 comments
Labels
🎉 enhancement New feature! lib-wasix Issues related to the WASIX toolchain. performance

Comments

@theduke
Copy link
Contributor

theduke commented Feb 19, 2025

Commands provided by packages and package dependencies are mapped into the filesystem under /bin/.

These mapped binaries currently have no connection to the underlying command, and are just mounted into the file system as virtual files.
This means each process spawn has to re-compute the hash of the Webassembly code to lod the underlying Module.
Commands already store the hash of the webassembly inside the package, making this step redundant.

This can be quite problematic because hashing of large WASM files is computationally expensive and can take a while.

When spawning many subprocesses, like in typical bash scripts, this will lead to significant overhead.
Even more so in shared environments like cloud servers (Edge).

We should find a way to map the FS-mounted command back to the original BinaryPackageCommand, so the hashed stored there can be re-used.

@theduke theduke added lib-wasix Issues related to the WASIX toolchain. performance 🎉 enhancement New feature! labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 enhancement New feature! lib-wasix Issues related to the WASIX toolchain. performance
Projects
None yet
Development

No branches or pull requests

1 participant