Skip to content

Conversation

@jasnell
Copy link
Member

Issue #25741 discusses a number of
performance considerations for fs.readFile, which was changed in Node.js
10.x to split discreet chunk reads over multiple event loop turns. While
the fs.readFile() operation is certainly slower than it was pre 10.x,
it's unlikely to be faster. Document the performance consideration and
link back to the issue for more in depth analysis.

Signed-off-by: James M Snell [email protected]
Fixes: #25741

@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Jan 11, 2021
Issue nodejs#25741 discusses a number of performance considerations for fs.readFile, which was changed in Node.js 10.x to split discreet chunk reads over multiple event loop turns. While the fs.readFile() operation is certainly slower than it was pre 10.x, it's unlikely to be faster. Document the performance consideration and link back to the issue for more in depth analysis. Signed-off-by: James M Snell <[email protected]> Fixes: nodejs#25741
@jasnelljasnellforce-pushed the doc-fs-readfile-perf branch from 9bb9abb to 92d731dCompareJanuary 15, 2021 16:31
@jasnelljasnell added the review wanted PRs that need reviews. label Jan 15, 2021
Copy link
Contributor

@aduh95aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That may be off-topic, but what about fs.promises.readFile? Otherwise LGTM.

@jasnell
Copy link
MemberAuthor

Landed in 408e9d3

@jasnelljasnell closed this Jan 18, 2021
jasnell added a commit that referenced this pull request Jan 18, 2021
Issue #25741 discusses a number of performance considerations for fs.readFile, which was changed in Node.js 10.x to split discreet chunk reads over multiple event loop turns. While the fs.readFile() operation is certainly slower than it was pre 10.x, it's unlikely to be faster. Document the performance consideration and link back to the issue for more in depth analysis. Signed-off-by: James M Snell <[email protected]> Fixes: #25741 PR-URL: #36880 Reviewed-By: Antoine du Hamel <[email protected]>
ruyadorno pushed a commit that referenced this pull request Jan 22, 2021
Issue #25741 discusses a number of performance considerations for fs.readFile, which was changed in Node.js 10.x to split discreet chunk reads over multiple event loop turns. While the fs.readFile() operation is certainly slower than it was pre 10.x, it's unlikely to be faster. Document the performance consideration and link back to the issue for more in depth analysis. Signed-off-by: James M Snell <[email protected]> Fixes: #25741 PR-URL: #36880 Reviewed-By: Antoine du Hamel <[email protected]>
@ruyadornoruyadorno mentioned this pull request Jan 22, 2021
ruyadorno pushed a commit that referenced this pull request Jan 25, 2021
Issue #25741 discusses a number of performance considerations for fs.readFile, which was changed in Node.js 10.x to split discreet chunk reads over multiple event loop turns. While the fs.readFile() operation is certainly slower than it was pre 10.x, it's unlikely to be faster. Document the performance consideration and link back to the issue for more in depth analysis. Signed-off-by: James M Snell <[email protected]> Fixes: #25741 PR-URL: #36880 Reviewed-By: Antoine du Hamel <[email protected]>
targos pushed a commit that referenced this pull request May 1, 2021
Issue #25741 discusses a number of performance considerations for fs.readFile, which was changed in Node.js 10.x to split discreet chunk reads over multiple event loop turns. While the fs.readFile() operation is certainly slower than it was pre 10.x, it's unlikely to be faster. Document the performance consideration and link back to the issue for more in depth analysis. Signed-off-by: James M Snell <[email protected]> Fixes: #25741 PR-URL: #36880 Reviewed-By: Antoine du Hamel <[email protected]>
@danielleadamsdanielleadams mentioned this pull request May 3, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.review wantedPRs that need reviews.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs.readFile is slower in v10

4 participants

@jasnell@gireeshpunathil@aduh95@nodejs-github-bot