Energy Patterns for Mobile Apps

← show all patterns

Avoid Extraneous Work

Avoid performing tasks that are not visible/valuable to the user and/or quickly become obsolete.

Context

Mobile apps have to perform a number of tasks simultaneously. There are cases in which the result of those tasks is not visible (e.g., the UI is presenting other pieces of information), or the result is not necessarily relevant to the user. This is particularly critical when apps go to the background. Since the data quickly becomes obsolete, the phone is using resources unnecessarily.

Solution

Select a concise set of data that should be presented to the user and enable/disable update and processing tasks depending on their effect on the data that is visible or valuable to the user.

Example

Consider a time series plot that needs to display real-time data. The plot has to be constantly updated — if the user scrolls down a UI view and the plot becomes hidden, the app should cease drawing operations related with the plot.

References

Occurrences

Android

Issues
Pull Requests
Commits

iOS

Issues
Pull Requests
Commits