-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch update. #110
Open
cheme
wants to merge
126
commits into
paritytech:master
Choose a base branch
from
cheme:updatable_traverse
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Batch update. #110
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update test, failing for simple leaf value update.
Next extend case, and then case where branch in middle of partial.
but not necessary.
of a partial (currently it does as if it is always append only).
Condition is duplicated and should be refactored.
… (in a call before exit)
…ex as relative to node but it is absolute to root: next fix that).
can test completness of detached when swap due to fuse).
prefix). Attached trie is prerequisite to be prefixed at attached location.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I open this draft PR to gather opinion on how to solve #109.
This is a branch I wrote, but I drop it because the performance gains are not relevant (iirc some 20/30% on memorydb bench which is pointless when considering the additional code).
Yet doing it with this kind of method (sorted input and only a stack of branch in memory), could help with #109 .
So is it a good idea to push forward with this?
It requires some code cleaning, variable renaming, removing attach and dettach code, asserting the proof is optimal.
Maybe removing the
ProcessingStack
abstraction or rewriting it from scratch could result in more compact code (looking back at it is probably around 1000 line of code without the attach/detach and test specific code).There is also some redundant node accessor and other not really good looking stuff (main purpose of initial implementation was only to get an idea of the performance improvment).
Note that the attach/detach subtrie code was written for a possible optimisation of
clear_prefix
substrate operation that would just detach a trie and only parse/delete its value when pruning (that was proposed for child trie).So this PR is mainly here to illustrate the second solution to #109 , I would be happy to continue this, but maybe it is better to write the same anew.
Note that this originally replies to #40.