Frozen-Developers/android-cache-cleaner

Differences in scanning speeds

Closed this issue · 10 comments

Great KISS app. Thank you.

Sometimes when scanning for all the caches, Cache Cleaner is very fast. Other times, it is relatively slower. Any idea why the difference?

Does it really need to scan for all the caches before deleting them, or could those operations be combined?

Either way, it seems to work perfectly. 👍

lubo commented

Hello @Gitoffthelawn, thank you for appreciating our effort.

When it comes to speed of scanning, there is pretty much nothing we can do about that. The actual scanning is being done by Android and Cache Cleaner is just waiting for Android's response. Furthermore, the process is asynchronous so it is probably as fast as it can be.

No, it does not need to scan for all the caches before deleting them, it only need doing so in order to inform users how much cache is being used and to inform users how much cache was cleared.

You're welcome! I do appreciate your effort!

Any ideas why scanning is sometimes real fast, and other times not as fast? There are no other user apps running in the background... perhaps system apps slow things down a bit?

It's interesting to learn that the scan is not necessary. I wonder if that fact can lead to an improved UI. Here's my off-the-cuff analysis...

There are two primary tasks with Cache Cleaner:

  1. Discover which apps have large amounts of cache, and then optionally clean the caches.
  2. Clean all the caches regardless of the amounts being used.

About 10% of the time, I perform the first task. Most of the time, I perform the second task.

Currently, Cache Cleaner excels at the first task. It also works for the second task, but is a bit time-consuming because it automatically performs the scan.

Perhaps Cache Cleaner could start with two buttons: (1) 'Clean All Caches' and (2) 'Discover Caches'. Pressing the first button would instantly clean all the caches. Pressing the second button would perform the current behavior.

lubo commented

I would say it is system load what makes a difference.

We would like to keep the UI design as is. Instead, we could change behavior of "Clean on app startup" setting.

No matter what, the app is great. Very KISS, no ads, no permissions, and works perfectly.

I actually misread the "Clean on app startup" option. I thought it said "Clean on startup" (as in system startup). I'll have to look closer at what that option does.

Basically, I wait for the app more than I would like. Not a big deal, but sometimes discussing the possibility of a small improvement can make it better for everyone.

lubo commented

Actually, this is a good idea for optimization. I will try to look at it ASAP.

lubo commented

Ok, I have do it in optimizations branch. @Gitoffthelawn, would you like to try it ?

I would! I'm overloaded with agenda-items right now, so if you push it to F-Droid, I will test it out when it is released. If you need pre-release testing, let me know, and I'll put it on my schedule.

lubo commented

I am not planning any pre-releases, so if you are interested, checkout optimizations branch and build it yourself.

lubo commented

Merged to master, changes will be present in the next release.

Looking forward to it. Thank you!