Improve address status index performance #120
No reviewers
Labels
No labels
area: database
area: documentation
area: elasticsearch
area: herald
area: packaging
area: scribe
consider soon
critical
dependencies
good first issue
hacktoberfest
help wanted
improvement
needs: repro
new feature
priority: blocker
priority: high
priority: low
priority: medium
type: bug
type: bug-fix
type: discussion
type: feature request
type: improvement
type: new feature
type: refactor
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/hub#120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "resumable-hash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds a resumable sha256 digester, which allows the status hash to be mutated from where it's left off instead of rebuilding it from scratch each time a new element needs to be added.
Main comment: You should check len(state) >= ctx_size and raise an error if input size is not OK.
You should check
len(state) >= ctx_size
and raise an error if input size is not OK. Actually handling the exception is probably not necessary, but we should get some predictable failure when size is wrong.I don't see this being used.
Should be
__copy__
if the intention is to hook into the copy() function.https://docs.python.org/3.9/library/copy.html?highlight=copy
Not needed? It's encapsulated in ResumableSH256.
Seems like it might be possible to reduce the number of gets if this is delayed until after:
If it is uncommon to have empty
new_history
then never mind.I think it's impossible for there to not be a new history, and this is meant to allow compaction independent of advancing a block. It should be ok to delete but I'd need to test this.