streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
10.31k stars 635 forks source link

Notesnook impossible high battery usage #6695

Open X-Ryl669 opened 1 month ago

X-Ryl669 commented 1 month ago

What happened?

Two cases:

  1. With notesnook opened (but not in foreground), the battery on Android (Xiaomi Mi OS, Android 9) drains like crazy (in 4h, it's depleted, notesnook consumed 92% of the battery in the "battery utilization report")
  2. Even with notesnook dismissed (meaning, I've slided the application after having used it so it should be closed), it still consume battery (in 10h, used 90% of the battery). In Mi OS, a backgound application is killed by the system, but it seems notesnook isn't.

Steps to reproduce the problem

Case 1. Open notesnook, swap to another application. Wait 4h, watch battery drains. Case 2. Open notesnook, open the "all application menu", swipe Notesnook to close it. It still drains battery. Only a force close solves the issue, but it's a pain to do.

Version

v3.0.18

Platform/OS

Android

Relevant log output

I didn't run any logcat alongside the application. Should I?

Huly®: NN-6560

thecodrr commented 1 month ago

Do you have anything special turned on in the app settings like Background sync etc?

ammarahm-ed commented 1 month ago

Hey @X-Ryl669 Can you share logs from your app. Go to Settings -> Debugging -> Debug logs. Copy the logs and share them here.

X-Ryl669 commented 1 month ago

Yes background sync is on. Everything else is off.

X-Ryl669 commented 1 month ago

I'm running the software for few hours and I'll post the debug log here. Do I need to anonymize some fields before posting?

X-Ryl669 commented 1 month ago

Screenshot_2024-10-14-14-07-19-196_com miui securitycenter notesnook_logs_1728907711071.txt

ammarahm-ed commented 2 weeks ago

Hi, I looked at the logs and I cannot find anything that would point to high battery usage. Can you try reinstalling Notesnook? On my phone the battery usage is very minimal for Notesnook.

X-Ryl669 commented 2 weeks ago

I'm doing that right now. Reinstalled the app from Google's store (was using Github release previously). I'll let you know in few hours, unplugged.

X-Ryl669 commented 2 weeks ago

Seems to work better (only 2% usage in 2 hours). I'm doing it again with Github's release APK