apps-android-commons icon indicating copy to clipboard operation
apps-android-commons copied to clipboard

deleting cache memory in lists

Open HonzaG opened this issue 8 years ago • 4 comments

While you are in list of your upload, all of the images, that you loaded are still in the memory. This caused problems on slower/old devices, even if the images are resized. It should delete the cache after some amount of loaded images/while scrolling down.

HonzaG avatar May 20 '17 15:05 HonzaG

We did some memory profiling with @HonzaG 's phone/account, and while memory usage is much better than before, it increases steadily with scrolling down ContributionsListFragment.java, capping at 70MB usage with 100 pics. While that is still a lot better than previously, we could probably reduce it further.

misaochan avatar May 20 '17 17:05 misaochan

Are there specific problems that this is causing on older devices? The fact that memory usage increases is not necessarily indicative of any problem. The fact that it caps at 70MB simply means that the garbage collector kicks in around that time, which doesn't sound unusual. Garbage collection is a pretty expensive operation, and should generally not be forced manually (this can actually lead to decreased performance). Unless this is leading to a crash or leak, I would recommend against manual management of the GC.

dbrant avatar May 26 '17 18:05 dbrant

Ah okay, thanks @dbrant . No, I don't think it leads to any crashes or leaks that we know of, currently anyway.

misaochan avatar May 27 '17 06:05 misaochan

It would be interesting to know whether this is still an issue. Mobile devices have become higher spec, but subsequent OS releases also take more strain on the devices. Has anyone heard about this being an issue?

Thanks,

Chris.

chrisdebian avatar Dec 20 '24 14:12 chrisdebian