Open Bug 1217871 Opened 10 years ago Updated 3 years ago

fx possibly draining the battery

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect

Tracking

()

People

(Reporter: kjozwiak, Unassigned)

Details

Attachments

(1 file)

Attached image IMG_0069.PNG
I've noticed that FX is using a sustainable amount of battery lately. It's been getting to the point where my phone get's drained to almost half in less than 2 hours while using fx. I'm not sure how actionable this bug might be, but I've added my use case below. * Attached screenshot of "Setting -> Battery" Use Case: - opened skysports.com/football - opened at least 15 different articles (sometimes 20+) using "Open In New Tab" so I can read them offline while on the subway - while I'm on the subway (No Service), I read through all the articles that I've opened I started at about 89% battery in the morning, by the time I go into the TO office (about a 1.5 hour commute), I was down to about 50% which is pretty bad IMO for a brand new 6s+. I'm not sure if this is an iOS issue or an issue with fx but it was definitely not happening a week or ago and I was using fx heavily as well including the same use case that I've mentioned above. Let me know if there's anything else that I can provide to help debug this :)
Having the screen on alone does kill battery -- I see this to some extent on my iPhone 6 using Feedly, Pocket, and Facebook. A 6s+ has an even bigger screen, so chews through even more battery. But let's see if we can get to the bottom of this. * Do you have Sync set up? Sync, if set up, will try to sync every fifteen minutes. That means your phone's radio has to wake up and enter high-power mode for a little while, which will have an effect. * Does this happen on other sites? If you read, say, Reddit all morning, do you see different results? My suspicion is trackers on that page that keep the JS engine running and occasionally hit the network. * Do you see similar behavior if you use Safari?
Flags: needinfo?(kjozwiak)
Would be worthwhile to enable Energy logging usage https://developer.apple.com/library/ios/recipes/Instruments_help_articles/LoggingEnergyUsageinaniOSDevice/LoggingEnergyUsageinaniOSDevice.html We can then import your data into the energy diagnostics instrument and filter on the fennec process
> Having the screen on alone does kill battery -- I see this to some extent on > my iPhone 6 using Feedly, Pocket, and Facebook. A 6s+ has an even bigger > screen, so chews through even more battery. Strange part is that I wasn't seeing this about a week ago. I was actually really surprised when I got into the office and the battery was still around 85% while heavily using it on the subway when I initially got the 6s+. Not really sure why it changed so dramatically. > * Do you have Sync set up? Sync, if set up, will try to sync every fifteen > minutes. That means your phone's radio has to wake up and enter high-power > mode for a little while, which will have an effect. Nope, Syn isn't currently setup. Just the plain vanilla browser with no bookmarks etc.. > * Does this happen on other sites? If you read, say, Reddit all morning, do > you see different results? My suspicion is trackers on that page that keep > the JS engine running and occasionally hit the network. Not sure.. But I suspect you might be right.. Sky is a pretty bad website when it comes to tracking/ads. I'll try using several other websites today when I travel back home and see if I get the same results. > * Do you see similar behavior if you use Safari? I've only used Safari for the first 2-3 days before switching over to FX but I don't remember seeing anything like this. I'll try the same use case on Monday and see what happens. I'll try different websites with FX/Safari and report back some results mid next week. > https://developer.apple.com/library/ios/recipes/Instruments_help_articles/ > LoggingEnergyUsageinaniOSDevice/LoggingEnergyUsageinaniOSDevice.html > > We can then import your data into the energy diagnostics instrument and > filter on the fennec process Awesome, thanks for the link :) I'll attach some logs once I have the data.
Flags: needinfo?(kjozwiak)
The subway is one of the most horrible environments for the phone's radio. It will constantly try to connect/reconnect to the mobile network, which causes a huge power drain. This happens on all platforms, from Android to Blackberry. I don't want to write this off too quickly and we should investigate, but I would rather do power monitoring in a well connected environment first to find out if we are doing something bad. Measuring in a known bad environment is not going to give us good results.
(In reply to Stefan Arentz [:st3fan] from comment #4) > The subway is one of the most horrible environments for the phone's radio. > It will constantly try to connect/reconnect to the mobile network, which > causes a huge power drain. Yeah, that's my suspicion -- that these pages are doing background requests which keep the radio alive and trying to connect to the network for the entire subway ride. There's not much we can do about that, I suspect, beyond unloading background tabs (which will give a terrible UX).
(In reply to Stefan Arentz [:st3fan] from comment #4) > The subway is one of the most horrible environments for the phone's radio. > It will constantly try to connect/reconnect to the mobile network, which > causes a huge power drain. This happens on all platforms, from Android to > Blackberry. > > I don't want to write this off too quickly and we should investigate, but I > would rather do power monitoring in a well connected environment first to > find out if we are doing something bad. Measuring in a known bad environment > is not going to give us good results. Fair enough :) I'll attach some initial logs from a controlled environment using the energy logging mentioned in comment # 2. In the meantime, I'll go through the same use cases that were suggested in comment # 1: * try going through the same use case using Safari * try going through the same use case using FX but with a different website If I notice differences between the two browsers, I'll start adding some logs.
(In reply to Richard Newman [:rnewman] from comment #5) > There's not much we can do about that, I suspect, beyond unloading > background tabs (which will give a terrible UX). One thing we can do is handle offline support better. I think when you currently flip your phone to Airplane Mode, we make it impossible to switch to tabs that you have previously loaded. I am not sure what happens, but often they immediately flip to the No Network error page. I know sometimes Safari evicts background tabs, and then it will be tough to read them offline. But I wonder if we do something that may trigger the error upon tab switching.
We can also profile with the Energy Usage tool in Instruments. I quickly did that when opening a bunch of tabs from skysports.com. I noticed some very heavy CPU usage (it is not a light site by any means) but it did calm down completely after everything had loaded. Towards close to zero energy usage. So i *think* idle/loaded tabs behave ok.
I recorded the energy usage for both FX [1] and Safari [2] while going through the same use case I mentioned in comment # 0. * turned off wifi and used LTE * used each browser for about 20 minutes * opened a bunch of articles, read through some articles, browsed through the Sky Football website etc.. * also opened Ars Technica here and there and read through 2-3 articles From what I noticed while recording, it seems like both browsers used about the same amount of energy.. but I'm no expert at interpreting the data so I've linked them below. I'll record the energy usage while I'm untethered while I head home tonight and will attach the logs as well. [1] https://s3.amazonaws.com/mozrelated/iOSenergyUsage/FX.trace.zip [2] https://s3.amazonaws.com/mozrelated/iOSenergyUsage/safariMobile.trace.zip
Bug 1220378 may be related. That is most certainly a regression. It is more about long time energy usage than this specific bug though. Not duping. I would like to keep this one open too until we understand how to interpet the attached logs. (Thanks Kamil!)
Here are two more logs that I took while commuting into the office. The ones listed below resemble the environment that I was originally in when I observed comment #0 happen. I did two passes, one with the network disabled [1] and one with the network enabled [2]. * left the office and started opening 10-20 articles that I wanted to read before I got into the subway * the network fluctuated between 3G/LTE/No Service * when I reached area's that did have a network available, I would open a few more articles [1] https://s3.amazonaws.com/mozrelated/iOSenergyUsage/subwayFXNoNetwork.trace.zip [2] https://s3.amazonaws.com/mozrelated/iOSenergyUsage/subwayFXwithNetwork.trace.zip
Here's another large profile log that I captured while commuting [1]. This one has the network logging enabled as well. In this particular instance, the battery went from about 60% to 28% or so within an hour and a half. [1] https://s3.amazonaws.com/mozrelated/iOSenergyUsage/FXwithNetwork.trace.zip
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: