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

Improve WebDAV performance #549

Merged
merged 1 commit into from
Sep 9, 2020
Merged

Improve WebDAV performance #549

merged 1 commit into from
Sep 9, 2020

Conversation

jxors
Copy link
Contributor

@jxors jxors commented Mar 1, 2019

This PR does two things:

  • Add io.Copy(ioutil.Discard, resp.Body), which is needed for proper connection reuse, as described here: https://awmanoj.github.io/tech/2016/12/16/keep-alive-http-requests-in-golang/
  • Use a non-rate limited reader for uploading when there is no rate limit set. This ensures that the file is sent in one chunk instead of multiple. Some WebDAV servers don't like chunked transfer, and take longer to process files sent that way.

The current code performs as follows for me:

duplicacy-chunked

And with this PR, it looks like this:

duplicacy-nonchunked

Please forgive any stupid mistakes I might have made. This is quite literally my first time doing anything in go.

@CLAassistant
Copy link

CLAassistant commented Mar 1, 2019

CLA assistant check
All committers have signed the CLA.

@gilbertchen
Copy link
Owner

This pull request has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/error-too-many-open-files/3155/33

@gilbertchen gilbertchen merged commit 4369bcf into gilbertchen:master Sep 9, 2020
@gilbertchen
Copy link
Owner

Thank you for the fixes. This seems to fix https://forum.duplicacy.com/t/error-too-many-open-files/3155 -- I should have merged this much earlier...

@gilbertchen
Copy link
Owner

This pull request has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/cli-2-7-0-is-now-available/4260/1

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