Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: make recursive readdir algorithms iterative #47650

Merged
merged 6 commits into from
May 10, 2023

Conversation

Ethan-Arrowood
Copy link
Contributor

@Ethan-Arrowood Ethan-Arrowood commented Apr 20, 2023

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

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Apr 20, 2023
@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
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
@anonrig anonrig added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Apr 20, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 20, 2023
@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Apr 20, 2023
@nodejs-github-bot
Copy link
Collaborator

lib/fs.js Outdated Show resolved Hide resolved
Co-authored-by: mscdex <mscdex@users.noreply.github.com>
lib/fs.js Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
lib/fs.js Outdated Show resolved Hide resolved
Ethan-Arrowood and others added 2 commits April 25, 2023 10:47
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@Ethan-Arrowood
Copy link
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 😄

@Ethan-Arrowood
Copy link
Contributor Author

Is there anything blocking this from merging?

@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label May 9, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 9, 2023
@nodejs-github-bot
Copy link
Collaborator

@anonrig
Copy link
Member

anonrig commented May 9, 2023

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
Copy link
Member

MoLow commented May 9, 2023

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

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@MoLow MoLow added the commit-queue Add this label to land a pull request using GitHub Actions. label May 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 10, 2023
@nodejs-github-bot nodejs-github-bot merged commit 12a93ce into nodejs:main May 10, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in 12a93ce

targos pushed a commit that referenced this pull request May 12, 2023
PR-URL: #47650
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
danielleadams pushed a commit that referenced this pull request Jul 6, 2023
PR-URL: #47650
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
MoLow pushed a commit to MoLow/node that referenced this pull request Jul 6, 2023
PR-URL: nodejs#47650
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants