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

Perf: copying dir contents in parallel #1026

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

SukkaW
Copy link
Contributor

@SukkaW SukkaW commented Oct 27, 2023

The PR uses a technique similar to #885 to speed up the recursive copy operation.

As fs-extra is built on top of graceful-fs, this change won't cause EMFILE: too many open files as graceful-fs will exponentially backoff and retry.

Copy link
Collaborator

@RyanZim RyanZim left a comment

Choose a reason for hiding this comment

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

Change looks good to me; but would like a second pair of eyes here to make sure I'm not missing something.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 10, 2023

@manidlou bump

Copy link
Collaborator

@manidlou manidlou left a comment

Choose a reason for hiding this comment

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

LGTM

@RyanZim RyanZim merged commit d293448 into jprichardson:master Nov 28, 2023
12 checks passed
@RyanZim
Copy link
Collaborator

RyanZim commented Nov 28, 2023

Published in v11.2.0!

@SukkaW
Copy link
Contributor Author

SukkaW commented Nov 28, 2023

@RyanZim ❤️

Too bad I can't port this change to Node.js' fs#cp. Node.js doesn't have graceful-fs, thus EMFILEcan not be avoided.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 28, 2023

Too bad I can't port this change to Node.js' fs#cp. Node.js doesn't have graceful-fs, thus EMFILEcan not be avoided.

You'd have to implement a concurrency limit yourself, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants