Closed Bug 1822918 Opened 3 months ago Closed 3 months ago

Weather fetch can take too long to start after wake or coming online


(Firefox :: Address Bar, task, P1)




113 Branch
Tracking Status
firefox113 --- fixed


(Reporter: adw, Assigned: adw)


(Blocks 1 open bug)



(1 file)

Currently the weather suggestion is fetched on a 30-minute timer. The timer stops ticking while the computer is asleep, so if you put your computer to sleep at night and wake it in the morning, it can take up to 30 minutes for the suggestion from the previous night to be refreshed. Similarly, if you're offline and you come online, it can take the full refresh period for the suggestion to be fetched again.

Sync faces this same problem, so we can take inspiration from it. It listens for the following observer service notifications and schedules new syncs as necessary:

This listens for some observer service notifications so we can re-fetch the
weather suggestion after wake and coming online, without having to wait for the
timer to fire. Please see the bug for background.

I changed the interval (repeating timer) to a timeout (non-repeating timer)
since the timer needs to be recreated on wake if the wake happens before the
start of the next fetch period.

Pushed by
Fetch the weather suggestion after wake and coming online. r=daisuke
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Blocks: 1823080
You need to log in before you can comment on or make changes to this bug.