You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 14, 2022. It is now read-only.
Is your feature request related to a problem? Please describe.
While implementing a fix for another issue, I noticed that database loading appears to always happen on the main thread (e.g. loadEntries() in the EntriesCardAdapter). This is generally a bad practice, and the UI lag may be noticeable on slower devices. I use a Samsung S9 in my everyday usage and haven't noticed it on that device, however I can imagine that on slower/older devices the lag may be more noticeable.
Describe the solution you'd like
Ideally, we could offload database loading and any file parsing onto a background thread. Perhaps we could add a loading progress view (where applicable) while the background work completes.
Additional context
I looked at usages of DatabaseHelper.loadDatabase to find where this was happening, though I believe this may be happening in other places. Adding a quick Application impl for the app with StrictMode thread policy logging enabled can help root out any instances.