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

Make bufsize adjustable #20

Merged
merged 2 commits into from Mar 31, 2023
Merged

Make bufsize adjustable #20

merged 2 commits into from Mar 31, 2023

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Mar 30, 2023

cpython uses copyfileobj under the hood for fast copies but the default buffer size is quite low which increases the amount of time in python code when copying the sqlite database. As this is the usually the bulk of the backup, increasing the buffer can help reduce the backup time quite a bit

related:
In testing (non encrypted) improvement was at least as good as python/cpython#71386

cpython uses copyfileobj under the hood for fast copies
but the default buffer size is quite low which increases
the amount of time in python code when copying the sqlite
database. As this is the usually the bulk of the backup,
increasing the buffer can help reduce the backup time
quite a bit

related:
python/cpython#71386
@bdraco bdraco marked this pull request as ready for review March 30, 2023 01:36
@pvizeli pvizeli merged commit 98d4b60 into pvizeli:main Mar 31, 2023
1 check passed
@bdraco
Copy link
Contributor Author

bdraco commented Mar 31, 2023

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.

None yet

2 participants