Skip to content

Conversation

vis-eyth
Copy link

Description of Changes

These changes allow SDK consumers to register a tokio::sync::mpsc::UnboundedSender<DbUpdate> for a DbConnection that directly receives all database updates instead of the ClientCache.

Rationale

For writing tooling the current client cache feels very inefficient - these changes allowed us to reduce memory consumption by around a factor of 8, from being able to run the tooling for one region of BitCraft Online to all of them. Batch processing all rows in a database update as well as processing them in a different thread also lead to increased performance.

Expected complexity level and risk

1 - for complexity i believe this is a fairly minor change, although not completely aware of your scale.
? - for risk.

Behavioral changes only exist if the channel is registered via DbConnectionBuilder::with_update_channel, currently hidden from the docs. Risk may increase significantly if DbUpdate/TableUpdate channels are not meant to be public API and are in flux.

Testing

I do not have any tests for these changes, but have run a patched SDK with these changes for a while in bitcraft tooling such as https://github.com/vis-eyth/bitcraft-nodeindex.

@CLAassistant
Copy link

CLAassistant commented Sep 14, 2025

CLA assistant check
All committers have signed the CLA.

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