WebAssembly / wasi-http

Other
149 stars 24 forks source link

Consider optimizations to reduce the number of host calls #6

Open lukewagner opened 1 year ago

lukewagner commented 1 year ago

While host calls are pretty fast these days, it's still useful to consider optimizations to reduce their number per request for really low-latency scenarios. This has come up in two areas so far:

Both seem like potentially good ideas to me but I'd be happy to hear more thoughts.

brendandburns commented 1 year ago

fwiw, part of the motivation to reduce host calls is also to improve the security of the surface area. I believe it is easier to ensure the security of a single req(...) style call vs all of the memory manipulation of the various calls between guest and host.

It's also a cleaner abstraction for the implementor, so fewer bugs in the implementation.