See
|
writeViaStream(_offset) { |
, when this is invoked repeatedly to do a lot of small appends, there is O(n^2) slowdown due to repeatedly concatenating buffers. I noticed this when working on
bjorn3/browser_wasi_shim#95; almost all wasi in-memory vfs implementation written in js/ts I can find has the same issue, including this one.