Skip to content

Iterate all sub directories instead of collecting all files at once. #34

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 4 commits into from
Dec 12, 2019
Merged

Conversation

Schnoop
Copy link
Contributor

@Schnoop Schnoop commented Nov 29, 2019

We have a folder structure that has many files. We are talking about > 10000 files that should be cleaned. We're going to hit the memory_limit if we execute the command with that amount of files as in current implementation all files will be collected at once.

Instead of reading all files from all subdirectories at once it is less painful if we iterate over all subdirectories and read that amount of files located in those subdirectories.

@freekmurze freekmurze merged commit 19e0f92 into spatie:master Dec 12, 2019
@freekmurze
Copy link
Member

Thanks!

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.

2 participants