Update the API calls for the GSP chart to call one and not all GSPs.
Context
In light of data loading slowly or not at all on the FE, we've identified a few quick fixes on the FE and BE. This issue is part of that speed up effort.
When the FE queries GSP chart information, the FE currently queries the database for all GSPs. It might make more sense to only get forecast data for the GSP a user has selected to look at.
Possible Implementation
Update the use-get-gsp-data.tsx hook to query only one GSP at a time and then update the index.tsx and forecast-gsp-header.tsx files accordingly and see if the chart populates faster.
Detailed Description
Update the API calls for the GSP chart to call one and not all GSPs.
Context
In light of data loading slowly or not at all on the FE, we've identified a few quick fixes on the FE and BE. This issue is part of that speed up effort. When the FE queries GSP chart information, the FE currently queries the database for all GSPs. It might make more sense to only get forecast data for the GSP a user has selected to look at.
Possible Implementation
Update the
use-get-gsp-data.tsx
hook to query only one GSP at a time and then update theindex.tsx
andforecast-gsp-header.tsx
files accordingly and see if the chart populates faster.