Skip to content

FileManager: Reduce memory usage of copyItem(atPath:toPath:) #1519

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

Merged
merged 1 commit into from
Apr 17, 2018

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Apr 16, 2018

  • Enumerate a directory directly instead of using
    subpathsOfDirectory(atPath:) and creating an array.

  • When copying a regular file, use a buffer sized to st_blksize instead
    of doing a whole file read/write.

- Enumerate a directory directly instead of using
  subpathsOfDirectory(atPath:) and creating an array.

- When copying a regular file, use a buffer sized to st_blksize instead
  of doing a whole file read/write.
@spevans spevans requested a review from kperryua April 16, 2018 21:58
@spevans
Copy link
Contributor Author

spevans commented Apr 16, 2018

@swift-ci please test

@spevans
Copy link
Contributor Author

spevans commented Apr 17, 2018

@swift-ci please test and merge

@swift-ci swift-ci merged commit dbb354a into swiftlang:master Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants