Closed jerryn70 closed 7 years ago
Can you provide some information as to why you believe bitwarden is abnormally consuming your battery? We have not yet had this report. Is it tied to use of the autofill service?
Without opening or using bitwarden the battery consumption is increasing in time to time.
Well here is the battery consumption comparison between other password managers & bitwarden . ●Lastpass ●Dashlane ●PassKeep2Android ●Bitwarden
After boot (battery between 90% - 99%) -Lastpass used : 1.3% -Dashlane : 2.1% -keepass2android : 0.3 -bitwarden : 5.2%
Battery between (5% -15%)
-lastpass : 7.3% -dashlane : 9% -Keepass2android : 5.2% -Bitwarden : 16.2%
.I think bitwarden is always connected to net server and while others connect only when their is new entry or edit. Next day After the phn boot i kept the phn ideal for 1 hr without opening bitwarden and checked the battery consumption of apps, bitwarden scores the top consumption of 3.2%. You need to do something about this.
My phone: moto x play Stock marshmallow 6.0.1 Non rooted
I suspect some of this has to do with the autofill service running. Can you try your tests with autofill turned off?
When i turned off auto fill, battery consumption is reduced .
Ok, that makes a little more sense. Do you have the autofill services turned on in the other apps you are comparing bitwarden to?
Yes auto fill is turned ON in other apps when i compared. The other thing that i noticed is, all other apps optimize battery (reduce consumption) itself when phn is in ideal or they didn't find any auto fill columns for a while. But bitwarden is increasing its battery consumption time to time.
@kspearrin see the difference . Auto fill is enabled on both .
Only bitwarden has push notifications process, maybe this causing high battery consumption
Possibly. Can you try stopping it to see if it helps for you?
I have tried but no use still consumption is increasing
Yes, it is most likely the autofill service then. There are two things that are weird here:
Will have to continue to investigate.
See the difference between bitwarden n keepass2android
There is no battery drain if i disable auto fill accessibility
I have noticed this as well, on both rooted and unrooted devices.
When rooted, I was tracking bitwarden at around 5% drain.
Yes I'm the only person reported battery consumption issue, maybe others are not concerned about battery life or maybe they didn't notice the consumption rate.
The thing i noticed is bitwarden's cpu usage (battery consumption) is increasing in every minute. While keepass2android cpu usage (battery consumption) increase only when we browse sites or use apps .
I think bitwarden looks for password box ever time even if the phn is in ideal , at the same time keepass2android looks for password box only if we open apps or sites .
These are my assumptions. I'm not a dev or tech .
But still im wondering how lastpass manages to make very low battery consumption. I think the use extra script for accessibility auto fill service.
I Hope you will fix the battery issue in the next release.
@jerryn70 does it still drain the battery even if the phone is asleep?
Yes, but at that time consumption is slower .
While phones screen is ON and not using any apps or anything it consumes 1% in every 1 minute.
While browsing sites or using any apps 1% to 5% consumption in every 1 minute
While sleep 1% consumption in every 2 minutes ....
@jerryn70 I have pushed a new build (550) to the beta channel on Google Play store. Can you try it out and see if any improvements?
@kspearrin i have tried but there is no difference. Still same as the current stable version
@jerryn70 I have the same issue on my device:
@kspearrin @Primokorn all my test shows bitwarden uses doubles the battery of keepass2android . If kP2A uses 10% bitwarden will be 20% or above. And we cannot compare bitwarden's consumption with lastpass because last pass is very good in battery saving. You can see comparison between lastpass on my previous post.
Here is the result of latest bitwarden with KP2A
Thinking about this more, real optimizations will only come if we reduce the number of times the service scans the screen looking for password fields. Currently this happens every time the app detects that there is a change to the screen (a lot!).
What if we changed it so that the notification was always present and when the user taps the notification, only then do we scan the screen to collect username/password field data? That way screen scanning is on demand instead of happening all the time.
The downside to this is of course that the app will no longer be as intelligent about offering the notification only when it can actually help.
I think in a way this might be how LastPass works sometimes. There are always cases where I have to click the notification in order for it to determine what the auto fill.
Is there a way to get it to scan the window periodically or in the first 5 seconds and then stop?
Is there a way when not rooted to disable individual services an app uses?
Can we scan only when keyboard is opened? That would be a good time to guess that we are inputting login info.
@ralesi Only scanning with keyboard open is a possibility. We could make it a setting?
@kspearrin 'Scan only when keyboard is open' is a good idea. Or we can use lastpass type auto-fill "scan only when we click on username/password box" . I think that's why lastpass has very low battery consumption.
I've also noticed this.
I'd be fine with having to click on either a Quick Tile or Bitwarden in the notification shade for it to scan the page/app for a login form.
In LastPass, I often have to click on the password field for it to trigger the popup telling me that I have an option to auto-fill. It's convenient, but I would imagine this still taxes the battery on some level.
My preference would be to have to manually click on a button to get the auto-fill option - saving the greatest amount of battery life.
@kspearrin As you said the service scans the screen looking for password fields everytime when the app detects screen changes. My question is this, is the screen scanning rate is same as keepass2android or higher.?
If it is higher, then we can reduce it to the level of KP2A , because KP2A didn't failed to show autofill notification in all my test. Reducing scanning rate may reduce battery usage .
@jerryn70
As far as I know, our implementation is identical to KP2A.
I will release a beta sometime soon with some changes that you can test for me.
@kspearrin just tag me when new beta is available. I will test n report back.
@jerryn70 Will do. I plan to start working on it soon. Thanks for the testing thus far.
@jerryn70 Can you send me an email at https://bitwarden.com/contact so that I can send you some custom builds to try?
@jerryn70 and others:
Here is a custom build that tests the strategy we discussed above about always showing the notification and only scanning for password fields whenever the autofill is attempted.
https://ci.appveyor.com/api/buildjobs/4gby8sxkvhjh5b10/artifacts/com.x8bit.bitwarden-767.apk
Please let me know if it helps at all.
@kspearrin The ways we discussed
1, Always show notification :- scan for password fields when we click on the notification.
2, Scan only when keyboard is opened.
3, Scan when we click on password field (like laspass)
So the 1st method is created . And iam testing it. Do you have plan for method 2 and 3 ?
No plans for 2 or 3 yet. I first need to understand if scanning for passwords like we are going in the live app is actually what is causing battery issues. The test build should confirm that for us.
I've been testing the new build since last night and there's a huge difference now - basically zero battery life with general use. The feature works exactly as expected.
I did have to set the notification (through Android) to "Low Priority) to get rid of the persistent icon and drop it lower on lists of notifications showing on the notification shade. But those are personal preferences.
@ep2017 I may be able to adjust that priority programmatically. What does the priority do to the notification (I'm not an Android user)?
@kspearrin "Never make sound or vibrate. never peek and LED. Hide from lock screen and status bar. Notifications will be shown at the bottom of the notification center."
That's the official tool tip. Private Internet Access VPN operates in "low priority" mode and it helps to unclutter things!
@kspearrin Success 😀😀
Great! Any issues using the autofill that you have found?
@kspearrin I mainly concentrated on the battery consumption ,and i didn't noticed any issues . Well I will investigate more in coming days.
Can you please remove the app icon from the notification bar.? See screenshot
@jerryn70 You can remove the icon now by setting Bitwarden to low priority for notifications as I described above (at least until this is an option to do it in the app).
@ep2017 i don't know how to do that. this is the default settings in my phone. In on stock marshmallow. Can you plz guide me .
@jerryn70 Ah,looks like Nougat makes it easier.
@ep2017 But users below android 7 has no way to get rid of it.
@kspearrin Till now there is no issues on the test version. When I tap on the notification it will correctly shows the matching result. The only problem I noticed is bitwarden icon on the notification bar. Check my above post for its screenshot.
@jerryn70 I'm sure the feature will be added in-app. I'm using that method because it's a temporary option in Nougat. I also don't like persistent icons for most things.
I think this issue shouldn't be closed.
This fix isn't perfect: • it adds a persistent notification (one more line in the notification panel and I already have my firewall, VPN and Privacy Guard) • seeing the notification was a way to see if a browser is supported. No notification in Firefox => bitwarden won't work.
3, Scan when we click on password field (like laspass) This is the best solution that you should try to implement IMO.
Need some tweaks to reduce battery consumption.