Open orestisfl opened 4 years ago
Issue is that the trace.write calls like this one: https://github.com/wasm3/wasm-trace/blob/8f1aa89e811e221a83a89a6de806599d8df6f0cd/wasm-trace.js#L283 return false after a while and the whole output gets buffered. Eventually, node runs out of memory.
trace.write
false
Node's memory can be increased with --max-old-space-size= but I've encountered situations where any size increase is eventually not enough.
--max-old-space-size=
As a solution, wasm-trace can wait for 'drain' events or can use a synchronised API like fs.writeSync.
wasm-trace
fs.writeSync
Issue is that the
trace.write
calls like this one: https://github.com/wasm3/wasm-trace/blob/8f1aa89e811e221a83a89a6de806599d8df6f0cd/wasm-trace.js#L283 returnfalse
after a while and the whole output gets buffered. Eventually, node runs out of memory.Node's memory can be increased with
--max-old-space-size=
but I've encountered situations where any size increase is eventually not enough.As a solution,
wasm-trace
can wait for 'drain' events or can use a synchronised API likefs.writeSync
.