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: make recursive readdir algorithms iterative by Ethan-Arrowood · Pull Request #47650 · nodejs/node

Conversation

@Ethan-Arrowood

@Ethan-Arrowood Ethan-Arrowood commented Apr 20, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

This PR updates the new readdir recursive algorithm to be iterative. This helps avoid potential callstack issues for very large directories.

Sorry, something went wrong.

Uh oh!

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

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels Apr 20, 2023
Ethan Arrowood
fs: make readdir recursive algorithm iterative
28fc566
@Ethan-Arrowood
Ethan-Arrowood force-pushed the improve-recursive-algs branch from 7de1599 to 28fc566 Compare April 20, 2023 19:46
@Ethan-Arrowood Ethan-Arrowood changed the title fs: make recursive readdir and opendir algorithms iterative fs: make recursive readdir algorithms iterative Apr 20, 2023
@Ethan-Arrowood
Ethan-Arrowood marked this pull request as ready for review April 20, 2023 19:48
anonrig
anonrig reviewed Apr 20, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Comment thread lib/fs.js Resolved

Uh oh!

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

Ethan Arrowood
review suggestions
f15aa53
anonrig
anonrig approved these changes Apr 20, 2023
View reviewed changes
@anonrig anonrig added 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 Apr 20, 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 Apr 20, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 20, 2023

Copy link
Copy Markdown
Collaborator

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

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 Apr 20, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 21, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

mscdex
mscdex reviewed Apr 21, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

@Ethan-Arrowood @mscdex
Update lib/fs.js
57f16be
Co-authored-by: mscdex <[email protected]>
aduh95
aduh95 reviewed Apr 22, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Apr 24, 2023
CI Reliability 2023-04-24 nodejs/reliability#545
Open
39 tasks
@Ethan-Arrowood @aduh95
Update lib/fs.js
36bad0f
Co-authored-by: Antoine du Hamel <[email protected]>
aduh95
aduh95 reviewed Apr 24, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

mscdex
mscdex reviewed Apr 24, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

mscdex
mscdex reviewed Apr 24, 2023
View reviewed changes
Comment thread lib/fs.js Resolved

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Apr 25, 2023
CI Reliability 2023-04-25 nodejs/reliability#546
Open
38 tasks
Ethan-Arrowood and others added 2 commits April 25, 2023 10:47
@Ethan-Arrowood @aduh95
Update lib/fs.js
8803165
Co-authored-by: Antoine du Hamel <[email protected]>
Ethan Arrowood
make it even faster
679d8cd
@Ethan-Arrowood

Ethan-Arrowood commented Apr 25, 2023

Copy link
Copy Markdown
Contributor Author

Thank you for the great recommendations @mscdex

I have made all the changes and thought I haven't timed it, the tests are running noticeably faster on my local machine 😄

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Apr 26, 2023
CI Reliability 2023-04-26 nodejs/reliability#547
Open
36 tasks
@Ethan-Arrowood

Ethan-Arrowood commented May 9, 2023

Copy link
Copy Markdown
Contributor Author

Is there anything blocking this from merging?

All reactions

Sorry, something went wrong.

Uh oh!

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

@aduh95 aduh95 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 May 9, 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 May 9, 2023
@nodejs-github-bot

nodejs-github-bot commented May 9, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

anonrig
anonrig approved these changes May 9, 2023
View reviewed changes
@anonrig

anonrig commented May 9, 2023

Copy link
Copy Markdown
Member

Since 7 days have passed since you opened this PR, we can merge this with only 1 review, but I prefer to wait a couple of days to receive a review from @nodejs/fs team.

MoLow and Ethan-Arrowood reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@MoLow

MoLow commented May 9, 2023

Copy link
Copy Markdown
Member

Since 7 days have passed since you opened this PR, we can merge this with only 1 review, but I prefer to wait a couple of days to receive a review from @nodejs/fs team.

I will take a look later

Ethan-Arrowood reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

jasnell
jasnell approved these changes May 10, 2023
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented May 10, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

MoLow
MoLow approved these changes May 10, 2023
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented May 10, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@MoLow MoLow added the commit-queue PRs queued for automated landing through the Commit Queue. label May 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label May 10, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 12a93ce into nodejs:main May 10, 2023
@nodejs-github-bot

nodejs-github-bot commented May 10, 2023

Copy link
Copy Markdown
Collaborator

Landed in 12a93ce

All reactions

Sorry, something went wrong.

Uh oh!

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

This was referenced May 11, 2023
CI Reliability 2023-05-11 nodejs/reliability#562
Open
CI Reliability 2023-05-12 nodejs/reliability#563
Open
targos pushed a commit that referenced this pull request May 12, 2023
Ethan Arrowood @targos
fs: make readdir recursive algorithm iterative
106dc61
PR-URL: #47650
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
This was referenced May 13, 2023
CI Reliability 2023-05-13 nodejs/reliability#564
Open
CI Reliability 2023-05-14 nodejs/reliability#565
Open
CI Reliability 2023-05-15 nodejs/reliability#566
Open
@targos targos mentioned this pull request May 15, 2023
v20.2.0 release proposal #48020
Merged
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
Ethan Arrowood @danielleadams
fs: make readdir recursive algorithm iterative
8e9a78b
PR-URL: #47650
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
Ethan Arrowood @MoLow
fs: make readdir recursive algorithm iterative
9b44c56
PR-URL: nodejs#47650
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
@danielleadams danielleadams mentioned this pull request Jul 10, 2023
v18.17.0 release proposal #48694
Merged
@juanarbol juanarbol mentioned this pull request Nov 4, 2024
withFileTypes has different behavior in fs.readdir when reading symbolic directories #52663
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 left review comments
@jasnell jasnell jasnell approved these changes
@anonrig anonrig anonrig approved these changes
@MoLow MoLow MoLow approved these changes
+1 more reviewer
@mscdex mscdex mscdex left review comments
Reviewers whose approvals may not affect merge requirements

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. commit-queue-squash PRs the Commit Queue should land as one squashed commit. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run.

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.

7 participants

@Ethan-Arrowood @nodejs-github-bot @anonrig @MoLow @mscdex @jasnell @aduh95
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.