Skip to content

Conversation

alex
Copy link
Contributor

@alex alex commented Aug 17, 2025

a) Avoid copying lists in executemany_void: while some callers provide an iterator, others were already providing a list and in that case we had to copy it
b) Avoid unpacking and re-packing contexts

In total this shaves about 10% of the combine time in pyca/cryptography's CI

a) Avoid copying lists in executemany_void: while some callers provide an iterator, others were already providing a list and in that case we had to copy it
b) Avoid unpacking and re-packing contexts

In total this shaves about 10% of the combine time in pyca/cryptography's CI
@nedbat
Copy link
Owner

nedbat commented Aug 17, 2025

Thanks!

@nedbat nedbat merged commit aae0ad9 into nedbat:master Aug 17, 2025
46 checks passed
@alex
Copy link
Contributor Author

alex commented Aug 17, 2025 via email

nedbat added a commit that referenced this pull request Aug 17, 2025
@nedbat
Copy link
Owner

nedbat commented Aug 17, 2025

Combining has had a number of performance problems over the years. Looking forward to what you have.

nedbat added a commit that referenced this pull request Aug 17, 2025
@alex alex deleted the combine-optimize branch August 17, 2025 17:08
@alex
Copy link
Contributor Author

alex commented Aug 17, 2025

The core idea is "avoid going sqlite3 -> python -> sqlite3" by using ATTACH DATABASE.

@nedbat
Copy link
Owner

nedbat commented Aug 23, 2025

This is now released as part of coverage 7.10.5.

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