See
|
private write(content: Uint8Array, _offset: bigint, buffers: Uint8Array[]): [Uint8Array, size] { |
, when a lot of small writes happen, there's an O(n^2) overhead due to repeatedly concatenating buffers and copying over old content. Might also be the culprit of
#234.
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.