Improve blockchain.address.get_history performance #40

Merged
jackrobison merged 6 commits from improve-history-cache into master 2022-05-22 06:00:39 +02:00
jackrobison commented 2022-05-19 22:55:55 +02:00 (Migrated from github.com)

This updates the caching of address histories to match the pattern used in scribe, which is much more performant. In addition to caching the final address histories, the tx_hash and heights are also cached in a smaller (but more items) cache that allows for a high hit rate on blocks containing transactions that touch many addresses (where each touched address has a fairly large history).

Additionally, the history cache is now updated in place using a minimal set of batched lookups upon a new block instead of being cleared.

This updates the caching of address histories to match the pattern used in `scribe`, which is much more performant. In addition to caching the final address histories, the tx_hash and heights are also cached in a smaller (but more items) cache that allows for a high hit rate on blocks containing transactions that touch many addresses (where each touched address has a fairly large history). Additionally, the history cache is now updated in place using a minimal set of batched lookups upon a new block instead of being cleared.
shyba (Migrated from github.com) reviewed 2022-05-19 22:55:55 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/hub#40
No description provided.