Skip to content

Improve dashboard loading time #277

@Tguntenaar

Description

@Tguntenaar

The Issue

The dashboards for Treasury Testing and Infinex Testing perform inconsistently. This ticket outlines multiple steps to stabilize the experience for all users.

Current Behavior

The dashboard retrieves graph data from our ref-sdk-api, which acts as a proxy to make RPC calls, preventing us from hitting rate limits too quickly. Currently, we use caching to mitigate these limits.

To improve dashboard load times, we previously moved API logic higher in the stack and aggregated all graph data into a single API call to speed up period-switching in the charts.

Problems

  • Rate Limits: We still hit RPC rate limits, especially on the Infinex dashboard, which has two charts making frequent RPC calls. Starting February 1st, these limits will decrease further.
  • Theme Configuration & Reloading: The treasury configuration (light/dark theme) is fetched via RPC. This causes the top component in our tree to reload the entire page, triggering all RPC requests again before the initial data is cached.
  • State Management Limitations: In BOS, state management isn’t available, and prop drilling isn’t an ideal solution.

Proposed Improvements

Below are some improvements to stabilize performance:

  • Refactor the ref-sdk-api (PR #9)
  • Cycle through multiple RPC endpoints
  • Cache individual RPC responses using Node Cache
  • Prevent duplicate API processing for identical requests from the same IP within a short timeframe (e.g., 2s) Addressing 241
  • Add a PostgreSQL database to index historical data
  • Improve frontend handling (e.g., avoid infinite loading screens; display clear error messages when the API fails)

Future Improvements

  • Optimize transaction history retrieval using the Sputnik Indexer

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions