fs: reduce memory retention when streaming small files#21968
fs: reduce memory retention when streaming small files#21968addaleax wants to merge 2 commits intonodejs:masterfrom
Conversation
|
/cc @nodejs/benchmarking |
ChALkeR
left a comment
There was a problem hiding this comment.
Changes look good, but lint fails.
Also, this probably needs benchmarking.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/16003/ (edit: green up to cancelled arm build) |
|
Benchmark results: Since there really isn’t any reason why the encoding should matter here, and we should expect 0.6 false positives, I’d ignore the one |
mcollina
left a comment
There was a problem hiding this comment.
LGTM.
Could this be effecting also 'net'?
|
@mcollina You mean, the same bug there? No, that’s not the case, because we shrink the buffer in native land before handing it over to JS. I’ve thought about implementing similar pooling there, though, as part of looking into https://github.com/nodejs-private/security/issues/186 (for those who can’t see it: it’s the bug that was resolved in 3217e8e). |
|
@addaleax Thx! there are a few cases in HTTP applications where I have seen very high RSS vs heap usage, without a leak. The effect looks very similar to this one. |
|
Landed in e3a4702 |
|
/cc @nodejs/lts ? |
Fixes: #21967
/cc @nodejs/fs
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes