Closed Bug 974207 Opened 11 years ago Closed 5 years ago

SafeBrowsing does frequent network activity

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: mfinkle, Unassigned)

References

Details

(Whiteboard: [Power:P3])

Thinking about power consumption, I have been looking at what network activity happens while Fennec is in the background. I notice that SafeBrowsing does some network requests more frequently than I expected. I wonder if it is due to this pref: pref("urlclassifier.max-complete-age", 2700); http://mxr.mozilla.org/mozilla-central/source/mobile/android/app/mobile.js#620 looks like it will ping Google every 2700 secs. Is this reasonable? Should it be longer? How long could we go and still be 'safe'? Could we double or triple it?
That particular setting doesn't do what you describe (it limits the max cache age). But you're correct SafeBrowsing will probe for updates every 45 minutes. This is a hard requirement in order to be allowed to use the protocol: https://developers.google.com/safe-browsing/developers_guide_v2?csw=1#LookupsAgeOfDataUsage
That said, we could suspend the updates while in the background, and restart them when we're foregrounded again. The "restart them when foregrounded part" is probably pretty error prone, as we'd need to remember any attempted updates. Alternatively, treat being foregrounded as a fresh browser start, which forces an update in the next 5 minutes (but that may be way too long for a mobile browser and cause us to get behind, meh). Is hitting the network every 45 minutes that problematic? Is that because this would cause the device to enable wifi and reestablish a connection? I'm sure my email client and whatnot cause way more network activity.
Blocks: powah
Whiteboard: [Power] → [Power:P3]
Once we switch to the new Google Play Services API (bug 1303393) this problem should go away entirely.
Depends on: 1303393
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.