Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

Streamline API requests in Angular change detection cycles #322

Open
CloudNiner opened this issue Nov 22, 2017 · 0 comments
Open

Streamline API requests in Angular change detection cycles #322

CloudNiner opened this issue Nov 22, 2017 · 0 comments

Comments

@CloudNiner
Copy link

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:

  • 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant