Skip to content

node:fs error path performance improvements - #49962

Closed
anonrig wants to merge 8 commits into
nodejs:mainfrom
anonrig:fs-improvements
Closed

node:fs error path performance improvements#49962
anonrig wants to merge 8 commits into
nodejs:mainfrom
anonrig:fs-improvements

Conversation

@anonrig

@anonriganonrig commented Sep 29, 2023

Copy link
Copy Markdown
Member

Closes#49863
Closes#49750
Closes#49748

Local benchmarks:

  • readlinkSync, linkSync, symlinkSync
fs/bench-linkSync.js n=1000 type='invalid' *** 33.31 % ±1.38% ±1.84% ±2.40%
fs/bench-linkSync.js n=1000 type='valid' -1.06 % ±3.29% ±4.40% ±5.77%
fs/bench-readlinkSync.js n=1000 type='invalid' *** 25.55 % ±0.96% ±1.28% ±1.66%
fs/bench-readlinkSync.js n=1000 type='valid' 4.01 % ±6.24% ±8.32% ±10.87%
fs/bench-symlinkSync.js n=1000 type='invalid' *** 31.08 % ±1.08% ±1.45% ±1.90%
fs/bench-symlinkSync.js n=1000 type='valid' 1.37 % ±3.34% ±4.45% ±5.79%
  • renameSync
fs/bench-renameSync.js n=2000 type='invalid' *** 44.88 % ±4.54% ±6.06% ±7.93%
fs/bench-renameSync.js n=2000 type='valid' -1.36 % ±4.57% ±6.08% ±7.92%
  • chownSync & lchownSync
fs/bench-chownSync.js n=10000 method='chownSync' type='existing' ** 3.08 % ±1.93% ±2.58% ±3.39%
fs/bench-chownSync.js n=10000 method='chownSync' type='non-existing' *** 90.16 % ±1.57% ±2.09% ±2.72%
fs/bench-chownSync.js n=10000 method='lchownSync' type='existing' -0.03 % ±1.99% ±2.65% ±3.45%
fs/bench-chownSync.js n=10000 method='lchownSync' type='non-existing' *** 87.50 % ±1.75% ±2.33% ±3.06%
  • mkdtempSync
fs/bench-mkdtempSync.js n=1000 type='invalid' *** 54.66 % ±1.72% ±2.30% ±3.01%
fs/bench-mkdtempSync.js n=1000 type='valid' -1.20 % ±3.58% ±4.77% ±6.20%

Ref: nodejs/performance#106

cc @nodejs/performance

@anonriganonrig added performance Issues and PRs related to the performance of Node.js. needs-benchmark-ci PR that need a benchmark CI run. labels Sep 29, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/startup

@anonriganonrig changed the title Fs improvementsnode:fs error path performance improvementsSep 29, 2023
@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Sep 29, 2023
@anonriganonrig added the commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. label Sep 29, 2023

@CanadaHonkCanadaHonk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM from initial pass

@joyeecheung

Copy link
Copy Markdown
Member

This needs a rebase since #49913 landed

@anonrig
anonrig marked this pull request as ready for review September 30, 2023 18:56
@anonriganonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 30, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonrig

Copy link
Copy Markdown
MemberAuthor

Errors seems to be related. I'll look into it.

@anonriganonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 1, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 1, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonrig
anonrigforce-pushed the fs-improvements branch 2 times, most recently from 573b0bf to c437b20CompareOctober 1, 2023 02:27
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@StefanStojanovic

Copy link
Copy Markdown
Contributor

The test that's problematic on Windows in the last few runs (parallel/test-worker-nearheaplimit-deadlock) is flaky, but only on x86. I've tested it locally on main to confirm that. The CI could be rerun until it eventually passes, but regardless of that, I plan to open a PR marking the flaky test on x86 Windows.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonrig

Copy link
Copy Markdown
MemberAuthor

We finally got the green CI. Appreciate it if anybody can leave a new review, so we can land this!

nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
The test is only flaky on x86 Windows.
Fixes: #50220
PR-URL: #50238
Refs: #49962
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Michael Dawson <midawson@redhat.com>
@H4adH4ad added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 18, 2023
@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 18, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 18, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in dbd0ffa...1a5db6f

nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
nodejs-github-bot pushed a commit that referenced this pull request Oct 18, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
targos pushed a commit that referenced this pull request Oct 23, 2023
The test is only flaky on x86 Windows.
Fixes: #50220
PR-URL: #50238
Refs: #49962
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Michael Dawson <midawson@redhat.com>
targos pushed a commit that referenced this pull request Oct 23, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
targos pushed a commit that referenced this pull request Oct 23, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
targos pushed a commit that referenced this pull request Oct 23, 2023
PR-URL: #49962
Refs: nodejs/performance#106
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
@targostargos mentioned this pull request Oct 23, 2023
@targostargos mentioned this pull request Nov 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.commit-queue-rebaseAdd this label to allow the Commit Queue to land a PR in several commits.lib / srcIssues and PRs related to general changes in the lib or src directory.needs-benchmark-ciPR that need a benchmark CI run.needs-ciPRs that need a full CI run.performanceIssues and PRs related to the performance of Node.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@anonrig@nodejs-github-bot@joyeecheung@tniessen@RafaelGSS@StefanStojanovic@mcollina@Qard@H4ad@CanadaHonk