-
Notifications
You must be signed in to change notification settings - Fork 55
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
Optimize uploading to S3 #9
Comments
It is unfortunate, but in order to be a compliant implementation (and pass the tests), it has to throw the same set of exceptions as all the other implementations. I'm open to suggestion regarding optimisations. I'd also consider api additions that didn't break old interfaces. |
Maybe, just introduce the additional option to S3FS contstructor, which would disable/enable such validation? |
That's an idea. How about |
Yes. This name ("strict") is much better. |
I have made the mentioned changes to the forked repository: miarec@756aff3 Probably, the comment could be improved. |
Looks good. Would you like to submit a PR for that? I'll get it in the next release. |
Is it necessary to send
GET
request to S3 every time the file is uploaded?In methods
S3FS.setbinfile()
andS3FS.setbytes()
, it sends two GET requests. First time, it checks if the the parent directory exists (callsS3FS.isdir()
). Second time, it checks if the URL is not a directory (callsS3FS.getinfo()
).These operations are quite expensive. The effective upload speed increases at least x3 times when these methods are not called.
Here is the existing code:
Proposed solution:
And similar changes should be applied to
setbytes()
method.The text was updated successfully, but these errors were encountered: