unicef / carrotjuice2

Front end to resources repo. Defaults to Brazil but will eventually be virus and country agnostic.
1 stars 1 forks source link

General performance audit & ideas #17

Open gatoatigrado opened 8 years ago

gatoatigrado commented 8 years ago

After some more features are in, we should do a general performance audit.

One defensive strategy: I think we could throw an _.debounce() on the redraw handler. This would prevent cascading events from redrawing repeatedly in the same ~10ms window.

jetpack commented 8 years ago

Another idea: Prefetch historical weather data. Currently, this is only done on date change (fetches data for all regions for that date) or on region-click (fetches N days of historical data for just that region).

Also applies to other data (mobility, epidemiological/case data).

gatoatigrado commented 8 years ago

Another idea: make the redraw function of the map controller only setState when things actually change.