I noticed while working on other issues that many duplicate requests are sent when a new Indicator is selected, and indicators are toggled back and forth. It would be good to address the many duplicate requests made. For example, if I open a project with no indicator selected, and then choose "Heat Wave Incidents" I see the following network traffic:
The network traffic includes:
2 requests to /api/historic-range/ when only one should be necessary
3 cancelled and then 4 more pairs of requests to /api/climate-data/:city/:scenario/indicator/heat_wave_incidents/ when one pair of requests should be sufficient
I see similar network traffic for any indicator that requires extra params, less so for indicators without them. However even average_high_temperature makes a duplicate pair of requests for indicator data.
I noticed while working on other issues that many duplicate requests are sent when a new Indicator is selected, and indicators are toggled back and forth. It would be good to address the many duplicate requests made. For example, if I open a project with no indicator selected, and then choose "Heat Wave Incidents" I see the following network traffic:
The network traffic includes:
/api/historic-range/
when only one should be necessary/api/climate-data/:city/:scenario/indicator/heat_wave_incidents/
when one pair of requests should be sufficientI see similar network traffic for any indicator that requires extra params, less so for indicators without them. However even
average_high_temperature
makes a duplicate pair of requests for indicator data.