Gallery
Gallery copied to clipboard
Slow Loading Thumbnails and File Propogation
Checklist
- [X ] I can reproduce the bug with the latest version.
- [ X] I made sure that there are no existing issues - open or closed - to which I could contribute my information to.
- [ X] I have read the FAQ and my problem isn't listed.
- [ X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [ X] This issue contains only one bug.
- [ X] I have read and understood the contribution guidelines.
Describe the bug Files can take a bit of time to load thumbnails in grid mode. If the files are already there, they load faster.
If the files were just added it seems to take a bit longer to get thumbnails. It just shows black squares, then they slowly pop in.
Sometimes it does a refresh so if you start holding and selecting stuff it will refresh and cancel your selection too.
If you switch from folder to timeline view, they all take their time to populate in as well.
This is also relevant if you are in an app, select a photo from gallery, and it uses this app as the gallery. It takes a while to load in.
Sometimes if you take photos with a camera, or download them, they don't always show up instantly. They may need a minute or a pull to refresh to appear.
To Reproduce Steps to reproduce the behavior:
-
Go to grid mode
-
Look at the grid of photos
-
Add a bunch of files, including videos
-
Go to grid mode
-
Watch them load in slowly
-
Before they start popping in, hold down on one to select it then start selecting others then after a few it will refresh and cancel all your selections and you have to start again but they are loaded in now
-
Switch from folder mode to timeline view
-
Watch it repopulate all the files and slowly load in one by one
Expected behavior Them to already be in there instantly. Especially if I've viewed that directory before.
Device info (please complete the following information):
- Model: Pixel 8 Pro
- OS: Android 14; GrapheneOS v 2023123100
- Version: Fdroid 1.1.0
Additional Information Could potentially be related to some hardening practice of GrapheneOS? Just a wild guess. I don't see why it would have to propagate thumbnails for stuff it already has them cached though. Some load instantly but not all. It's a flagship phone though, I really don't see why this should be an issue honestly.
Seems to be related to your second issue, so I'm linking them for someone who will try to fix it: https://github.com/FossifyOrg/Gallery/issues/51.
I honestly don't see any correlation between these two issues.
This one seems like it may be caching/scanning related. The other seems to just be a bug when rotating the device. And has nothing to do with thumbnails or the grid populating thumbnails and files.
To be clear though, this issue was present before the fork. So it's nothing you have changed. I do appreciate the efforts with the fork btw.
Just one more question, so the issue will be easier to validate: how many files do you have in a folder? Close to 100, 1000, 10000 or even more? Also, about how large are these files on average? 500 kB, 1 MB, 2 MB, more?
It varies, I do notice it takes longer the larger the file though. But I would say the average video size is around 3MB. Average photo 1MB or less
But yeah it varies. If I have a folder of mixed sized files, I don't notice some load faster than others overall. They just load in order.
image previews can load slowly if you open the folder and just quickly scroll to the bottom. you can see how the images are slowly loaded and they are black at first and then begin to appear, the transparency changes.
I was able to reproduce this problem on OnePlus 8 Pro with over 2300 files using Fossify Gallery 1.2.1. While showing all files at the startup, it takes a few seconds to start the app. I can imagine that with less performant phones it may take more time.
I understand that reading big folder with many, many files, it can take some time, but the issue is different. I open Fossify Gallery, background it via home button/gesture/whatever. I go to download some picture or make a screenshot. Then I go back to recent apps and open Fossify running in background, I look at folder Download or Screenshots. New file isn't there as latest thumbnail. I need to pull to refresh, as someone mentioned before, or wait few seconds (especially on huge 1.2.1 version) to see the latest file. So its not about whole folder but only new files in it. I am not a programmer but as a user of few different systems, inc. few versions of Android and few gallery apps, I suspect it may have something to do with refreshing of filesystem content. I regularly clean Downloads and Screenshots so they do not contain more than few tens of smaller files. Never more than 100, closer to 20-50. Sometimes totally empty. I need some info on app size caused by jpeg xl addition - is it really needed as embedded in app? Gallery shouldn't be as huge as 40 MB. Unfortunatelly another gallery app on F-droid has grown even more for similar reason, 4x like that or so, but not a place here to discuss it.
@seniorm0ment
Before they start popping in, hold down on one to select it then start selecting others then after a few it will refresh and cancel all your selections and you have to start again but they are loaded in now
@rafnov
reading big folder with many, many files [...] can take some time, but the issue is different [...] I need to pull to refresh, as someone mentioned before, or wait few seconds (especially on huge 1.2.1 version) to see the latest file. So its not about whole folder but only new files in it.
I can confirm both of these findings on three low-to-mid-range devices (from Exynos 7570, 2 GiB RAM, to Snapdragon 660, 6 GiB RAM), stock Android 9 to 11.
Unfortunately it is the second free gallery I have to stop using, at least until the obvious issue is fixed.