Closed mandrigin closed 6 years ago
Since I've already started on https://github.com/status-im/status-go/issues/633, I'll put it to "in-progress"
That is exactly the pattern I see in our code: https://developer.apple.com/library/content/documentation/Performance/Conceptual/EnergyGuide-iOS/EnergyandNetworking.html
Let me see what we can do with it...
One more observation is that discv5
is CPU intensive for some reason.
@mandrigin good observation regarding discv5, we are not using v5 and discovery in general. But it is enabled by default in p2p.Config
@dshulyak then I guess we can have a quick fix disabling discv5
and it should quickly improve the battery life :)
Because of the tradeoff between real-time communications and efficient energy usage, we can't really optimize much when the app is in the foreground. What we can do, is to optimize the background usage, so on Android, the node doesn't consume that much energy when being in background.
Next steps for what's relatively easy to fix.
1. Put the node into some low-power mode when the app is in background (https://github.com/orgs/status-im/projects/17)
2. Make Energy Testing Body of Knowledge (https://github.com/orgs/status-im/projects/18)
I can contribute ~10h / week
Closing this issue as part of spring cleaning. If this idea is still relevant, please submit a PR per https://github.com/status-im/ideas/#contributing. If you feel closing this issue is a mistake, feel free to re-open.
Preamble
Summary
A specific issue about the energy efficiency of different parts of Status (
status-go
,status-react
,desktop
(when running on a laptop battery).Swarm Participants
Product Overview
Energy consumption is a crucial part of the mobile experience, and even though it is related to performance, it is worth having a separate. The end goal is:
Goals
Create a BoK for Energy efficiency testing: https://github.com/orgs/status-im/projects/18 a. test apps are created for both Android and iOS b. test cases are written and tools are created to measure the energy efficiency of both Status client (status-react+status-go) and tests apps (status-go exclusively). c. tests are run on a regular basis d. (stretch goal) tests are automated for both platforms
Fix obvious issues with energy consumption https://github.com/orgs/status-im/projects/17
Exit criteria
status-go
andstatus-react
independently;go-ethereum
or new features of Status;Success Metrics
KR: (1) foreground energy consumption is < 120% of the apps in a similar class (messengers) (2) background energy consumption is < 120% of the apps in a similar class (messengers)
MVP(s)
MVP1 (docs & process): Create and integrate energy efficiency testing as a part of the release process (date: Mar, 30) MVP2 (development): Create a low-power background mode for status-go (date: Mar, 30)
Supporting Role Communication
Useful Links
https://github.com/dgryski/go-perfbook
Copyright
Copyright and related rights waived via CC0.