You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, iavl v1 nodeCache is not working efficiently. It adds the node to the cache whenever it gets the node. There are some meaningless usecases. Furthermore, it is leading to extra delays.
Pruning: Those nodes are added to the cache before deleting.
Querying: The querying is random access, there is no guarantee of re-visiting.
Proposal
Only adds to the cache whenever the node is created. This way, we can leverage access to the top-level nodes of the tree like the root, actually these nodes are highly frequently visited.
Use sync.Pool in the GetNode to leverage the memory re-use which is introduced in iavl v2.
The text was updated successfully, but these errors were encountered:
Context
Currently, iavl v1 nodeCache is not working efficiently. It adds the node to the cache whenever it gets the node. There are some meaningless usecases. Furthermore, it is leading to extra delays.
Proposal
sync.Pool
in the GetNode to leverage the memory re-use which is introduced in iavl v2.The text was updated successfully, but these errors were encountered: