-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce battery usage #1252
Comments
Thanks for the report! Main things I have in mind:
Display1. Make the dark theme the default one. We should make the system theme the default one. Users should be able to choose between readability in all lighting condition vs. battery life (as with all other apps). Changing the system theme on the fly could change the app theme, like we do in DW, and like most of the apps / wallets are doing. 2. Auto-switch to dark theme when battery level is low and when battery saving mode is on I forsee situations where this could be a huge annoyance. Being forced to use a dark theme (or being forced to do anything btw) can be frustrating in some (sunny) situations. Again, users should be free to choose depending on their needs IMO. 3. Update light theme colors to a darker shade This is about the design work + contrast constraints + branding, won't get into details, but tldr: I'm sure we shouldn't go that way. 4. Create new unified "gray" theme that does not consume a lot of energy (basically no dark/light anymore. Examples: Revolut, Phantom, Metamask) This would be a step backward. In the list you shared, Revolut and Phantom offer a light and dark theme. Revolut even adds plenty of style customization on top. Only Phantom offers 1 theme, and tbh I don't think it's cool. Funny enough: I was showing Phantom to a friend 2 weeks ago, we were hiking, we couldn't see a thing. I couldn't change to a light theme, so I ended up quitting! Conclusion: I would default to the system theme, and continue giving our users the choice between light and dark mode. GPUI mentionned that we should reduce the framerate. Capping it & the gyroscope readings to 30fps would drastically reduce the GPU load (some devices runs at 120fps+!) 1. Investigate how to "freeze" background animations when the focus is not on the screen with the animations Yes! 2. Remove animations (👎 not preferred) No. 3. Freeze animations when battery level low and when battery saving mode is on Yes, good idea if easily implementable. Conclusion: I start with capping to 30fps and freeze when not in view. If easily done, I'd then freeze when battery is low or battery saving mode is on. Network1. Reduce data polling from 10s to 60s Let's try Tanstack first. Ideally we don't want to slow down the perceived experience (for many reasons, including communication / marketing) which would in part cancel the work done on block time reduction etc. We want to showcase our speed. 2. Use Tanstack & caching to reduce number of request and reduce transferred data Yes! 3. Do not keep app active when in bg to keep WC session active now that ecosystem screen is integrated Yes! 4. dApps should not use the wallet's node & explorer providers through WC to request data and should rely on web3 providers Yes. Conclusion: let's start with not keeping the app active when in bg. This should make a big difference. Then follow up with Tanstack, then revaluate before considering reducing the polling rate. GeneralCreate "Battery saving" mode setting that is "off" by default. Enabling it could apply several of the optimizations above. Let's keep our settings simple. I don't think this will be needed if we apply the strategies discussed above. Overall conclusion
|
Hey guys, just a quick input—let’s not over-optimize this at the cost of UX or engineering complexity. For example, if a user only uses our app for a short time each day (e.g. 1% battery use among all apps), battery optimization won’t make a decent difference for them. If they prefer a light theme, forcing a dark theme purely for efficiency wouldn’t be worth it. Not sure if this is the best example, but it should convey the point I’m making. |
Also, I agree that this shouldn't be a priority unless there are parts of the code consuming significantly more battery than expected. |
I think we all agree. What sparked the investigation was a message from Reed that 1 minute of using the app consumes more battery than 2h of Netflix, 6 minutes consumed 10% of his battery, and 30min consumed 25%. |
Resources:
Related issues:
The text was updated successfully, but these errors were encountered: