azavea / climate-change-lab

Other
4 stars 1 forks source link

Streamline API requests in Angular change detection cycles #322

Open CloudNiner opened 6 years ago

CloudNiner commented 6 years ago

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:

screen shot 2017-11-22 at 09 46 35

The network traffic includes:

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.