stable
Clone or download
feat: request #35869 Enable Wasmtime cache
This contribution enables Wasmtime cache. This improves the performance when a module is executed multiple times. This approach is pretty straightforward and should be good enough as long as the execution of a WASM module is not involved in a direct interaction with a user/not in a time-sentitive execution path. If it becomes the case (or if the workload related to the execution of WASM code increases a lot) we will need to consider more fine tuned cache approach and probably invest in the optimization of the WASM module provided by the end users. The cache is wiped at each upgrade/restart of the Tuleap service. This makes sure that we do not end up with binaries incompatible with the host (think container orchestration with servers using different sort of hardware), binaries that are not useful anymore or potential issues during Wasmtime upgrade. This is likely excessive but it should be safe even in weird cases and it is easy to implement and understand 🙂 To test you will need to rebuild and redeploy `tuleap-wasmtime-wrapper-lib`. Change-Id: Ic28cceb528bb473debe8c37e9ed2cfc8961ab1ef
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/git/include/gitPlugin.php | +2 | −1 | Go to diff View file |
M | plugins/tracker_cce/include/tracker_ccePlugin.php | +2 | −1 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/Cargo.lock | +158 | −0 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/Cargo.toml | +1 | −1 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/src/lib.rs | +9 | −0 | Go to diff View file |
M | src/additional-packages/wasmtime-wrapper-lib/src/wire.rs | +1 | −0 | Go to diff View file |
M | src/common/WebAssembly/FFIWASMCaller.php | +13 | −2 | Go to diff View file |
A | src/common/WebAssembly/WASMCacheConfigurationBuilder.php | +30 | −0 | Go to diff View file |
A | src/common/WebAssembly/WasmtimeCacheConfigurationBuilder.php | +90 | −0 | Go to diff View file |
M | src/common/include/SiteCache.php | +7 | −0 | Go to diff View file |
A | tests/unit/common/WebAssembly/WasmtimeCacheConfigurationBuilderTest.php | +57 | −0 | Go to diff View file |