GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fs: improve error perf of sync `*times` by CanadaHonk · Pull Request #49864 · nodejs/node

Conversation

@CanadaHonk

@CanadaHonk CanadaHonk commented Sep 25, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Results from i7 Windows laptop:

                                                                confidence improvement accuracy (*)    (**)   (***)
fs\bench-timesSync.js n=1000 func='futimes' type='existing'                     1.30 %       ±8.42% ±11.20% ±14.57%
fs\bench-timesSync.js n=1000 func='futimes' type='non-existing'        ***    105.93 %      ±12.64% ±16.88% ±22.09%
fs\bench-timesSync.js n=1000 func='lutimes' type='existing'                     5.56 %       ±8.48% ±11.29% ±14.73%
fs\bench-timesSync.js n=1000 func='lutimes' type='non-existing'        ***     62.51 %      ±13.07% ±17.43% ±22.75%
fs\bench-timesSync.js n=1000 func='utimes' type='existing'                     -1.04 %       ±5.85%  ±7.78% ±10.13%
fs\bench-timesSync.js n=1000 func='utimes' type='non-existing'         ***     61.88 %       ±8.31% ±11.06% ±14.40%

Ref: nodejs/performance#106

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and H4ad reacted with rocket emoji
All reactions
  • 🚀 2 reactions
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels Sep 25, 2023
@CanadaHonk CanadaHonk mentioned this pull request Sep 25, 2023
Performance of node:fs nodejs/performance#106
Open
anonrig
anonrig reviewed Sep 25, 2023
View reviewed changes
Comment thread benchmark/fs/bench-timesSync.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@anonrig anonrig added performance Issues and PRs related to the performance of Node.js. author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Sep 25, 2023
anonrig
anonrig approved these changes Sep 25, 2023
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 25, 2023
@nodejs-github-bot

nodejs-github-bot commented Sep 25, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54239/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CanadaHonk

CanadaHonk commented Sep 26, 2023

Copy link
Copy Markdown
Member Author

1 more review please? Thanks! @nodejs/fs @nodejs/cpp-reviewers

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig
anonrig requested review from Qard, jasnell and joyeecheung September 26, 2023 15:43
@anonrig

anonrig commented Sep 27, 2023

Copy link
Copy Markdown
Member

@CanadaHonk can you resolve the conflicts?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig anonrig added the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Sep 27, 2023
@CanadaHonk
CanadaHonk force-pushed the perf-timessync branch from 4a1c86d to b9701f6 Compare September 27, 2023 14:07
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 27, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 27, 2023
@nodejs-github-bot

nodejs-github-bot commented Sep 27, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54294/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung reviewed Sep 27, 2023
View reviewed changes

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think the diff can be a lot simpler if you just change the sync branch of the original implementations instead of repeating the code in a new binding..(and if you only introduce new bindings, the original sync branch would be dead code..) also I think this breaks --trace-sync-io?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@anonrig

anonrig commented Sep 27, 2023

Copy link
Copy Markdown
Member

I think the diff can be a lot simpler if you just change the sync branch of the original implementations instead of repeating the code in a new binding..(and if you only introduce new bindings, the original sync branch would be dead code..) also I think this breaks --trace-sync-io?

I think differentiating promise and sync implementations are better to maintain and benchmark. I think this would make fast api implementations a lot harder.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung

joyeecheung commented Sep 27, 2023

Copy link
Copy Markdown
Member

@anonrig

I think differentiating promise and sync implementations are better to maintain and benchmark.

The async one isn't related to promises. I've laid out my reasons about maintainability in #49593 (comment)

I think this would make fast api implementations a lot harder.

Can you elaborate on why? I don't think there is a lot of differences between the sync and the async version - note that we do not call the async callback immediately, this means we can include them in the fast API just fine. Essentially the sync v.s. async part really just comes down to what you pass to the libuv methods.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Sep 28, 2023
CI Reliability 2023-09-28 nodejs/reliability#677
Open
CI Reliability 2023-09-30 nodejs/reliability#679
Open
@joyeecheung

joyeecheung commented Oct 2, 2023

Copy link
Copy Markdown
Member

#49913 has landed. Can you move the JS code back to lib/fs.js and switch to use SyncCallAndThrowOnError in the original implementation instead of introducing a new binding? Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@CanadaHonk @anonrig
fs: improve error perf of sync *times
4cfd327
@anonrig
anonrig force-pushed the perf-timessync branch from b9701f6 to 4cfd327 Compare October 11, 2023 18:46
@anonrig anonrig removed the commit-queue-squash PRs the Commit Queue should land as one squashed commit. label Oct 11, 2023
@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 11, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 11, 2023
@nodejs-github-bot

nodejs-github-bot commented Oct 11, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54713/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 11, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54725/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Qard
Qard approved these changes Oct 11, 2023
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Oct 12, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/54746/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung approved these changes Oct 12, 2023
View reviewed changes
anonrig pushed a commit that referenced this pull request Oct 12, 2023
@CanadaHonk @anonrig
fs: improve error perf of sync *times
6bd77db
PR-URL: #49864
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@anonrig

anonrig commented Oct 12, 2023

Copy link
Copy Markdown
Member

Landed in 6bd77db

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig anonrig closed this Oct 12, 2023
@RafaelGSS RafaelGSS mentioned this pull request Oct 15, 2023
2023-10-17, Version 21.0.0 (Current) #49870
Merged
@Trott

Trott commented Oct 15, 2023

Copy link
Copy Markdown
Member

https://ci.nodejs.org/job/node-test-pull-request/54746/

This was landed despite a failing Jenkins CI.

tniessen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig

anonrig commented Oct 15, 2023

Copy link
Copy Markdown
Member

https://ci.nodejs.org/job/node-test-pull-request/54746/

This was landed despite a failing Jenkins CI.

Yes, because the failing test was fixed in main branch. It was caused by test runner concurrency cli flag.

tniessen reacted with confused emoji
All reactions
  • 😕 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tniessen tniessen mentioned this pull request Oct 15, 2023
fs: improve error perf of sync chmod+fchmod #49859
Closed
targos pushed a commit that referenced this pull request Nov 11, 2023
@CanadaHonk @targos
fs: improve error perf of sync *times
8413670
PR-URL: #49864
Refs: nodejs/performance#106
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@targos targos mentioned this pull request Nov 12, 2023
v20.10.0 release proposal #50682
Merged
@juanarbol juanarbol mentioned this pull request Dec 6, 2023
2023-12-06, N|Solid v5.0.1 Iron Release nodesource/nsolid#41
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Qard Qard Qard approved these changes
@anonrig anonrig anonrig approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
@jasnell jasnell Awaiting requested review from jasnell

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@CanadaHonk @nodejs-github-bot @anonrig @joyeecheung @Trott @Qard
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.