Skip to content

Conversation

@alexggh
Copy link
Contributor

@alexggh alexggh commented Jan 23, 2026

The topics_and_keys is eating about 200 bytes per statement, which is about 30% of the contribution for each statement.

Since this structure was need only when we clean up of statement it makes more sense to just read the statement from the database instead of paying such a high memory price for each statement.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
if let Some((topics, key)) = self.topics_and_keys.remove(hash) {
for t in topics.into_iter().flatten() {
// Read statement from database to get topics and decryption key
let statement = db
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the idea of operating with the DB inside index?

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