Optimize selectClaimIsMine #7370

Merged
jessopb merged 1 commit from cherrypickselectforuri into master 2021-12-31 18:52:26 +01:00
jessopb commented 2021-12-28 22:15:35 +01:00 (Migrated from github.com)

Cherrypick some performance code - some manual work.

Frequently used; top in perf profile

Most of the time, you already have the claim object in the current context. selectClaimIsMineForUri will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time).

Break apart the logic and added the alternative selectClaimIsMine for faster lookup.

Cherrypick some performance code - some manual work. Frequently used; top in perf profile Most of the time, you already have the claim object in the current context. `selectClaimIsMineForUri` will retrieve the claim again, which is wasteful, even if it is memoized (looking up the cache still takes time). Break apart the logic and added the alternative `selectClaimIsMine` for faster lookup.
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/lbry-desktop#7370
No description provided.