[CL] Improve Performance of Liquidity Query via using iterators #4704
Labels
C:x/concentrated-liquidity
F: concentrated-liquidity
Tracking the development of concentrated liquidity feature to improve filtering on the project board
Background
In PR #4691 and #4714, we introduced a query to obtain the total liquidity across the entire pool. Currently, we iterate to the next pool using the NextInitializedTick method, which presents an opportunity to enhance performance. We aim to achieve this performance improvement by employing iterators and store helpers.
Unfortunately, we cannot directly use store helpers, as they do not provide an iteration method with a stop function that returns both key-value pairs. Moreover, using store helpers might not be the most efficient approach, as we need to use the poolId to parse the key and extract the tick values.
To address these concerns and optimize performance, we can explore two potential methods: creating a new store helper in osmoutils or utilizing iterators directly. Regardless of the chosen approach, our goal is to improve the performance of this query by leveraging iterators more effectively.
Suggested Design
nextInitializedTick
and changing it to use iteratorsThe text was updated successfully, but these errors were encountered: