Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching user's osmo balance from edge occasionally taking 800ms #3406

Open
ValarDragon opened this issue Jun 26, 2024 · 0 comments
Open

Fetching user's osmo balance from edge occasionally taking 800ms #3406

ValarDragon opened this issue Jun 26, 2024 · 0 comments

Comments

@ValarDragon
Copy link
Member

In network traces, I routinely see the following query taking 800ms, and appearing to block things about page load. Faster refreshes get 300ms.

https://app.osmosis.zone/api/edge-trpc-assets/assets.getUserAsset?batch=1&input=%7B%220%22%3A%7B%22json%22%3A%7B%22findMinDenomOrSymbol%22%3A%22OSMO%22%2C%22userOsmoAddress%22%3A%{OSMO_ADDRESS}%22%7D%7D%7D

Can we keep this value locally written to a file (e..g we cache all address / osmo amount pairs), and when this query is needed, we first return the local value, and then later get it from cache.

Also perhaps we should just do a direct RPC or SQS call to get a user's osmo amount, since this query is oddly slow on edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant