cosmos / iavl

Merkleized IAVL+ Tree implementation in Go
Apache License 2.0
409 stars 256 forks source link

Lazy Pruning #885

Closed cool-develope closed 3 months ago

cool-develope commented 4 months ago

Background

Currently, the pruning process in IAVL is synchronous and blocks the Commit flow, leading to performance bottlenecks, especially when pruning legacy orphaned nodes in v1.

Proposal

Implement lazy pruning in IAVL v1 to make the process asynchronous and improve performance. Lazy pruning will separate the pruning operation from the main SaveVersion flow, allowing it to run independently and not block the Commit flow.

Plan

alexanderbez commented 4 months ago

Nice! To be clear for those reading, by "lazy" we mean deferred execution.

ValarDragon commented 4 months ago

Would really appreciate us doing this!

tac0turtle commented 3 months ago

completed