-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Dashboard] graph loading speed is too slow #238
Comments
@petersalomonsen @rubycop @Megha-Dev-19 @Tguntenaar Do you have any ideas? |
Can we try to use our indexer for that? @Tguntenaar is it fast to implement? |
As a temporarily solution I've scaled the fly machine in multiple ways. First we keep the cache warm by always having a machine on. Secondly I scaled from 1 to 2 CPU's and 1gb to 2gb of RAM. I've also add 512mb swap_size_mb for memory spikes. If this doesn't speed it up the chart enough we can persistently cache the https://archival-rpc.mainnet.near.org responses. Not just in memory. One concern with this implementation is that the archival node will reduce it's rate-limits even further on February 1st. So the fly instance will get rate limited and so we NEED to make a more persistent cache, with Redis or Postgres. |
@rubycop We could also speed up the chart loading by prefetching the different periods data and not refetching when a user switches between periods. AKA by lifting the API call logic up. I will start implementing this now. |
I made 2 PR's, they both significantly upgrade the speed. |
Problem
Currently, the graph loading speed is way too slow (e.g. at worst I've observed close to 45 seconds) for the dashboard graph.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: