TeamAmaze / AmazeFileUtilities

An open source Google Files alternative for Android
https://teamamaze.xyz
GNU General Public License v3.0
316 stars 28 forks source link

Batching analysis screen to reduce memory footprint #150

Open VishalNehra opened 8 months ago

VishalNehra commented 8 months ago

Currently we have 2 types of analysis, the ones that are fired at app startup and the ones that are done at runtime when user navigates to analysis screen There are safeguard on analysis that are fired at startup so that it doesn't exceed memory usage, like say, stop analysis after 5000 images. However there's no safeguard for analysis that are initiated at runtime as user navigates to analysis screen. Almost all analysis are fired in a single shot, be it database calls from analysis results that started at app startup, or the ones that don't require to run at app startup as the user navigates to the analysis screen. This leads to slow performance, with the list of analysis increasing, it's only a matter of time the memory footprint will bump significantly as user navigates to analysis screen. We should have a way to either paginate the analysis screen or, load only few analysis at a time and load the next few only as user scrolls down the analysis screen.