osmosis-frontend icon indicating copy to clipboard operation
osmosis-frontend copied to clipboard

Break up the GetUserPools query

Open ValarDragon opened this issue 1 year ago • 1 comments

The getUserPools query takes >5s on my laptop.

This seems attributable to this function doing way too much and having a sub-optimal caching + server side vs client side strategy. https://github.com/osmosis-labs/osmosis-frontend/blob/4b0eab7475a7596efae19545de629a4d930c5ce9/packages/server/src/queries/complex/pools/user.ts#L31-L146

We can get each of the pool types independently. Furthermore some of this data already is known locally, e.g. queryAccountPositions

ValarDragon avatar Apr 09 '24 11:04 ValarDragon

I think migration to SQS pools query, which includes a list of pool IDs as input, greatly improves response time since we no longer have to filter over all pools

jonator avatar Oct 08 '24 03:10 jonator