Optimize atree inlining migration by over 1 hour on test vm #5913
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.
This PR reduces the duration of Crescendo (mainnet25) network upgrade by optimizing the first migration (atree migration using Cadence 0.42) during Crescendo network upgrade.
This optimizes atree migration by using new functions added at
github.com/onflow/atree
:NondeterministicFastCommit()
for nondeterministic commit to atree storageBatchPreload()
to preload atree slabs in parallelInformal test showed ~15% speedup (about 1 hour 20 minutes faster 🎉 ) on m1 vm using
nworkers=40
with all storage checks and validations enabled. Using more cpu cores or different input data (testnet vs mainnet data) may show different speedups.Most of the changes for this speedup are at
github.com/onflow/atree
. More info about atree inlining:feature/array-map-inlining
(atree inlining feature branch) tomain
atree#429