Description
Currently, when loading graphs for different tokens and time periods (1Y, 1W, 1D, 1H), we fetch all datasets in a single query upfront.
This is inefficient because:
- It increases initial load time.
- The frontend may not need all datasets immediately.
Proposed improvement:
- When the frontend requests data for a specific token and time period, fetch only that dataset from the backend and return it immediately.
- In the background, trigger fetches for the remaining datasets and store them in the database.
- The next time the frontend requests a different time period, the data will already be available in the DB.