-
Notifications
You must be signed in to change notification settings - Fork 68
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
Custom Chunk Size for GetContentFile #49
Comments
I think default is 100KB, not 100MB. @TA40 I think it should be very easy to add: pretty much add it here: https://github.com/iterative/PyDrive2/blob/master/pydrive2/files.py#L311 and pass it then to the downloader: https://github.com/iterative/PyDrive2/blob/master/pydrive2/files.py#L331 unless I'm missing something. Would be great to add a test as well for this. Feel free to create a PR and we'll release a new version very quick. Btw, out of curiosity - do you expect a better performance with a large buffer size? |
@TA40 hmm 🤔 Yes, you are right, it's 100Mb, sorry. https://github.com/googleapis/google-api-python-client/blob/master/googleapiclient/http.py#L72
that's probably true. 200MB can do some improvement in this case. Depending on the network speed/file system performance, I would expect though that OS buffers can mitigate this to some extent. I would test the network performance with some external tool and see if there are spikes. Btw, curious what is your use case for this? E.g. if you need to download multiple files you can also do it in parallel that should also keep the network loaded. |
I think... I did it? #50
I need to download multiple files to reupload them to another cloud service. And I want to do it as fast as possible.
I don't like downloading multiple files at once because it messes around with the disk i/o and RAM and I am running multiple scripts at once. |
Closed by #50 Thanks @TA40 ! |
Hello Thank you for development and contributions of PyDrive2:) I want to upload a huge zip file by PyDrive2. Are you planning to add a callback to show the upload progress? If the community isn't interested in implementing it, I'd consider implementing it myself. Please let us know your ideas and opinions. Thank you |
@KengoSawa2 that can be a good PR, happy to help with it! thanks 🙏 There is a workaround though, that you could use for now. That's how we do this in DVC (the primary reason we forked and support PyDrive2 at all): |
@KengoSawa2 also, consider creating a separate feature request issue for this. |
Thank you for your kind response. I also understand your workaround. Thank you :) |
Would it be possible to add a custom chunk size for the GetContentFile method?
Currently it imports the default chunk size given by googleapiclient. Maybe a overwrite method?
Like this:
Thanks.
The text was updated successfully, but these errors were encountered: