fmidev / weather-app

FMI's official weather application for mobile devices
7 stars 2 forks source link

Investigate and fix timeseries queries when app starts #576

Closed AnttiRumpunen closed 3 months ago

AnttiRumpunen commented 5 months ago

App seems to fire over 10-15 Axios calls during startup.

Especially forecast and observation axios calls need a closer look, they are fired at least 3 times resulting 6-9 calls depending on selected obs station. Rest (dynamic config/announcements/warnings...) seems to be called once.

geosaaga commented 5 months ago

Two reasons were found

  1. New geolocation caused exta queries even location remained same -> fixed in PR https://github.com/fmidev/weather-app/pull/579
  2. WeatherScreen is mounted twice during startup and both mounts generate queries. More complex issue and created new ticked for it https://github.com/fmidev/weather-app/issues/580