- From: Vitali Lovich <notifications@github.com>
- Date: Wed, 13 Oct 2021 13:55:41 -0700
- To: whatwg/streams <streams@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 13 October 2021 20:55:53 UTC
https://github.com/whatwg/streams/issues/1175 might be an API that's more easily optimized by implementations while offering the same semantics if needed. The reason is that you may want to allocate 1 large buffer & read as much from the kernel in one shot as you can with subsequent reads to fill up to the minimum amount. If you do the `readFully`, then unless the underlying kernel reads align perfectly, you'll end up issuing slightly more syscalls than needed. Probably not a material difference either way, but `readFully` could simply be a convenience wrapper for `readAtLeast(buffer.length, buffer)` (if the wrapper makes sense separately for ergonomic reasons). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/whatwg/streams/issues/1143#issuecomment-942713186
Received on Wednesday, 13 October 2021 20:55:53 UTC