Skip to content

fs: improve error performance for fdatasyncSync - #49898

Merged
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
pluris:perf/fdatasync
Oct 4, 2023
Merged

fs: improve error performance for fdatasyncSync#49898
nodejs-github-bot merged 4 commits into
nodejs:mainfrom
pluris:perf/fdatasync

Conversation

@pluris

@plurispluris commented Sep 27, 2023

Copy link
Copy Markdown
Contributor
 confidence improvement accuracy (*) (**) (***)
fs/bench_fdatasyncSync.js n=10000 type='existing' *** 6.39 % ±1.85% ±2.48% ±3.25%
fs/bench_fdatasyncSync.js n=10000 type='non-existing' *** 116.11 % ±6.89% ±9.21% ±12.08%
Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 2 comparisons, you can thus expect the following amount of false-positive results:
0.10 false positives, when considering a 5% risk acceptance (*, **, ***),
0.02 false positives, when considering a 1% risk acceptance (**, ***),
0.00 false positives, when considering a 0.1% risk acceptance (***)

Refs: nodejs/performance#106

@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 27, 2023
Comment threadsrc/node_file.cc Outdated
@anonriganonrig added request-ci Add this label to start a Jenkins CI on a PR. needs-benchmark-ci PR that need a benchmark CI run. performance Issues and PRs related to the performance of Node.js. labels Sep 27, 2023
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 27, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@joyeecheungjoyeecheung 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.

I don't think we should introduce a seemingly new implementation by copying and repeating the original implementation & moving code to a new JS file which makes git blame harder to use. See #49593 (comment)

@anonrig

Copy link
Copy Markdown
Member

Hey @pluris can you rebase this pull request? You'll see that sync.js file is now removed and merged into lib/fs.js

@pluris
plurisforce-pushed the perf/fdatasync branch 2 times, most recently from 358c67e to 78b27c0CompareOctober 1, 2023 16:03
@pluris

Copy link
Copy Markdown
ContributorAuthor

@anonrig I rebased and applied #49913.

@anonrig

Copy link
Copy Markdown
Member

@anonrig I rebased and applied #49913.

Can you re-add the benchmark?

@pluris

Copy link
Copy Markdown
ContributorAuthor

@anonrig I updated the description.

 confidence improvement accuracy (*) (**) (***)
fs/bench_fdatasyncSync.js n=10000 type='existing' 1.12 % ±1.51% ±2.01% ±2.62%
fs/bench_fdatasyncSync.js n=10000 type='non-existing' *** 109.42 % ±6.13% ±8.19% ±10.73%
Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 2 comparisons, you can thus expect the following amount of false-positive results:
0.10 false positives, when considering a 5% risk acceptance (*, **, ***),
0.02 false positives, when considering a 1% risk acceptance (**, ***),
0.00 false positives, when considering a 0.1% risk acceptance (***)

@anonrig

Copy link
Copy Markdown
Member

The benchmark you're running doesn't exist in main or in your pull request. Can you add the file to your pull request? :-) @pluris

@pluris

Copy link
Copy Markdown
ContributorAuthor

@anonrig Oh, sorry. I added it again.
I think I did something wrong during the rebase process. 😅

@anonriganonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 1, 2023
@anonriganonrig added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels 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

@pluris

Copy link
Copy Markdown
ContributorAuthor

Oops, there was a part where the condition check was missing, so I modified it again and updated the benchmark.

@pluris

pluris commented Oct 2, 2023

Copy link
Copy Markdown
ContributorAuthor

@joyeecheung GetValidatedFd() has also been removed here, as described in #49880 (explanation).

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

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonriganonrig added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 3, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 4, 2023
@nodejs-github-bot
nodejs-github-bot merged commit f7a160d into nodejs:mainOct 4, 2023
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in f7a160d

@pluris
pluris deleted the perf/fdatasync branch November 8, 2023 02:24
targos pushed a commit that referenced this pull request Nov 11, 2023
PR-URL: #49898
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
@targostargos mentioned this pull request Nov 12, 2023
debadree25 pushed a commit to debadree25/node that referenced this pull request Apr 15, 2024
PR-URL: nodejs#49898
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
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-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.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.

4 participants

@pluris@nodejs-github-bot@anonrig@joyeecheung