perf: Optimize diff algorithm with insights from #646#658
perf: Optimize diff algorithm with insights from #646#658tac0turtle merged 10 commits intocosmos:masterfrom
Conversation
|
What do you think about this change, @tac0turtle @cool-develope , the existing round-trip test is pretty exhaustive, and I've done complete run on our testnet data, so the correctness should be pretty solid. |
diff.go
Outdated
| newLeafNodes []*Node | ||
| // orphaned leaf nodes in previous version, which represents all deletions and updates. | ||
| // both `newLeafNodes` and `orphanedLeafNodes` are ordered by key. | ||
| orphanedLeafNodes []*Node |
There was a problem hiding this comment.
for me, newLeaves makes sense than newLeafNodes
|
I am still worried about the memory usage if we use |
I'll see what I can do. |
done, it's still not strictly constant memory, but I guess it's the best we can do here. |
|
can we backport to 0.19.x @tac0turtle |
|
@Mergifyio backport release/v0.19.x |
✅ Backports have been createdDetails
|
…osmos#658) (cosmos#665) Co-authored-by: yihuang <huang@crypto.com>
it's being running on our testnet,
not finished yet, but so far so good, the result is identical to previous version.EDIT: the task previously takes 19hours to run, now takes 14h20m, not bad.