Skip to content

zcash_client_sqlite: Enable WalletWrite calls in WalletDb::transactionally#2253

Merged
nuttycom merged 2 commits into
mainfrom
zcs-speedups
Mar 31, 2026
Merged

zcash_client_sqlite: Enable WalletWrite calls in WalletDb::transactionally#2253
nuttycom merged 2 commits into
mainfrom
zcs-speedups

Conversation

@str4d
Copy link
Copy Markdown
Contributor

@str4d str4d commented Mar 30, 2026

This enables amortizing the database transaction overhead, which gives a significant performance boost to repeated operations. For example, in Zallet this reduces the time to make 200 WalletWrite::store_decrypted_tx calls from 28s to 11s on my development machine.

nuttycom
nuttycom previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Collaborator

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 0535d18 modulo clippy fixes.

It might make sense for truncate_to_height_internal to take a SqlTransaction instead of a rusqlite::Transaction; I think that with that change the internals of SqlTransaction might be able to be entirely private instead of crate-private?

…tionally`

This enables amortizing the database transaction overhead, which gives a
significant performance boost to repeated operations. For example, in
Zallet this reduces the time to make 200 `WalletWrite::store_decrypted_tx`
calls from 28s to 11s on my development machine.
@str4d
Copy link
Copy Markdown
Contributor Author

str4d commented Mar 30, 2026

Force-pushed to fix clippy lint.

nuttycom
nuttycom previously approved these changes Mar 30, 2026
Copy link
Copy Markdown
Collaborator

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 11f1d59

@nuttycom nuttycom enabled auto-merge March 30, 2026 23:57
Apparently we weren't relying on accessing them outside this module, and
this is better for ensuring it is used correctly.
Copy link
Copy Markdown
Collaborator

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK e436033

@nuttycom nuttycom merged commit 2adfa40 into main Mar 31, 2026
52 checks passed
@str4d str4d deleted the zcs-speedups branch March 31, 2026 00:31
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