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

Fix Timeout/Allowed memory exhausted when to many files on read/write/overwrite/rename/delete #64

Merged
merged 1 commit into from
May 16, 2022

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Apr 22, 2022

There is a problem with the caching, when a folder has for example 1k files, i get Timeout exception or Allowed memory exhausted and the action is aborted, this is because it always tries to cache all the files on memory, but this is not necessary if you want write/overwrite/read/rename/delete only a single file

With this change the request must be faster because filter the files with the especific path on the query (name = '{$token}'), and less memory usage without loading unnecesary files

I don't know if this is a breaking change but i run the actual tests with and without teamDrive

PHPUnit 9.5.20

Runtime:       PHP 8.1.2
Configuration: /google_flysystem/phpunit.xml.dist

......................                                            22 / 22 (100%)

Time: 02:17.258, Memory: 8.00 MB

OK ( 22 tests, 99 assertions)

Review the pros/cons/impact before merging, I don't want to break something with this change(like duplicating folders/files)

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