deislabs / wagi

Write HTTP handlers in WebAssembly with a minimal amount of work
Apache License 2.0
890 stars 44 forks source link

Improve loading speed #3

Closed technosophos closed 3 years ago

technosophos commented 4 years ago

Right now, WAGI loads the WASM module at request time. Big WASM modules can take seconds to load.

There is probably a way to cache or preload modules to speed this up. wasm3 interprets rather than JIT-ing, and that might be substantially faster in this case (though I don't think wasm3 currently has WASI support).

radu-matei commented 3 years ago

There have been a few improvements in the Wasmtime ecosystem over the last few months around startup time:

It might make sense to add a readme section that talks about startup performance and some considerations.

technosophos commented 3 years ago

Oh, yeah... we totally should.

technosophos commented 3 years ago

@radu-matei Now that we have caching and preloading, I think we can close this one. Is that okay with you?

radu-matei commented 3 years ago

I agree, and even more with the instantiation improvements from Wasmtime.