Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upfs: reduce memory retention when streaming small files #21968
Conversation
addaleax
requested a review
from
ChALkeR
Jul 25, 2018
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
fs
label
Jul 25, 2018
ChALkeR
added
the
memory
label
Jul 25, 2018
This comment has been minimized.
This comment has been minimized.
ChALkeR
approved these changes
Jul 25, 2018
|
Changes look good, but lint fails. |
This comment has been minimized.
This comment has been minimized.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/16003/ (edit: green up to cancelled arm build) |
This comment has been minimized.
This comment has been minimized.
|
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
approved these changes
Jul 25, 2018
|
LGTM. Could this be effecting also |
This comment has been minimized.
This comment has been minimized.
|
@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 nodejs-private/security#186 (for those who can’t see it: it’s the bug that was resolved in 3217e8e). |
This comment has been minimized.
This comment has been minimized.
|
@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. |
benjamingr
approved these changes
Jul 26, 2018
trivikr
approved these changes
Jul 27, 2018
jasnell
approved these changes
Jul 27, 2018
This comment has been minimized.
This comment has been minimized.
addaleax
added
the
author ready
label
Jul 27, 2018
This comment has been minimized.
This comment has been minimized.
|
Landed in e3a4702 |
addaleax
closed this
Jul 29, 2018
addaleax
deleted the
addaleax:fs-pool-reuse
branch
Jul 29, 2018
addaleax
added a commit
that referenced
this pull request
Jul 29, 2018
This comment has been minimized.
This comment has been minimized.
|
/cc @nodejs/lts ? |
addaleax commentedJul 25, 2018
Fixes: #21967
/cc @nodejs/fs
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes