createRowStream is suboptimal
Opened this issue · 0 comments
Because it sets highWaterMark
to 0 (though documented as 16):
Lines 176 to 180 in 8670652
This makes sense for a page stream, because it means it won't make preemptive HTTP requests. But for
a row stream it means it'll push only one row (or "chunk") at a time, possibly hurting throughput:
Lines 68 to 76 in 8670652
I.e. the while
loop above never loops. It might be easier to push everything at once (ignoring the return value of push
). It's already occupying memory anyway.
Also, when the next readable-stream
is out (with nodejs/node@1e0f331), I can maybe get rid of:
Lines 46 to 48 in 8670652
For now, I recommend to use createPageStream
instead.