ruuvi / com.ruuvi.station.ios

iOS Ruuvi Station
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Reduce Cloud calls from iOS #1545

Open markoaamunkajo opened 1 year ago

markoaamunkajo commented 1 year ago

Description:

There is extensive amount of cloud calls from iOS build compared to Android. Please investigate and consult with Otso.

Image

markoaamunkajo commented 1 year ago

@priyonto are you using sensor dense endpoint to get latest datapoints?

priyonto commented 1 year ago

@markoaamunkajo Yes, and that approach was started with iOS. :)

markoaamunkajo commented 11 months ago

This was discussed in meeting, improvements will be hopefully showing in stats when next build is out in App Store

priyonto commented 1 month ago

Spending more time investigating I might have found why iOS makes so many calls even at night. Turned out even though Apple documentation says the widget reload is dynamic and learns from user behaviour of how frequently user visits the widget, and approximate refresh delay is 15-60 mins, the actual refreshing was happening once at least in two mins. And sometimes there are multiple calls made to endpoint automatically.

Screenshot 2024-07-20 at 18 48 45

Actual:

Screenshot 2024-07-20 at 18 36 45

After some rough optimisation:

Screenshot 2024-07-20 at 18 37 11