Skip to content
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

Improve resource management of app that remains running in background even if not active #15

Closed
abertschi opened this issue May 25, 2015 · 1 comment
Milestone

Comments

@abertschi
Copy link
Owner

The last harbour store app submission pointed out higher resource consumption of the app.

The app remains running in the background even if the server is not running. It is important for apps to go to idle state (i.e. do not cause power consumption) within 1-2min. But it also depends on what the application is doing while it is idle. Since the app seems it is not doing any thing while the server is not running, so we expect it to go to idle state. Pleas invedtigate this and try to fix it.
Here are the steps I used to check whether the app goes to idle state or not.

  1. Install the application (preferably on a clean/flashed device with the latest update), but don't run it
  2. In terminal, become root using 'devel-su', and run:
  3. ssu ar mer-tools
  4. pkcon refresh
  5. pkcon install powertop
  6. Lock the device/Wait until it goes to idle state(the screen turns off)
  7. In terminal again:
  8. powertop
  9. Wait for about 1 minute, and check the number of wakeups shown in summary (On a clean device with no application running, it should be around 20)
  10. Unlock the device and run the application, check that the number of wakeups has changed to something around 200 or more, and also that your app is shown on the list like this: /usr/bin/harbour-wlan-keyboard.
    11)Then lock the device and check the output again after ~1min; this time the app should go to idle state and disappear from the list after ~1minute (or a bit longer) and wakeups are under 60.

Hop you will find the above information useful and if you have any questions please don't hesitate to contact us at developer-care@jolla.com.

That seems reasonable because of this piece of code which keeps running even though the app may not be active anymore.

@abertschi
Copy link
Owner Author

Pause all connectivity checks if app is not running in foreground 9c4111d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant