Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Loading Thumbnails and File Propogation #54

Open
seniorm0ment opened this issue Jan 4, 2024 · 9 comments
Open

Slow Loading Thumbnails and File Propogation #54

seniorm0ment opened this issue Jan 4, 2024 · 9 comments
Labels
bug Something is not working

Comments

@seniorm0ment
Copy link

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:

  1. Go to grid mode

  2. Look at the grid of photos

  3. Add a bunch of files, including videos

  4. Go to grid mode

  5. Watch them load in slowly

  6. 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

  7. Switch from folder mode to timeline view

  8. 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.

@seniorm0ment seniorm0ment added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jan 4, 2024
@Aga-C
Copy link
Member

Aga-C commented Jan 4, 2024

Seems to be related to your second issue, so I'm linking them for someone who will try to fix it: #51.

@Aga-C Aga-C added device/software specific Issues that only happen on some devices or with some specific hardware/software and removed needs triage Issue is not yet ready for PR authors to take up labels Jan 4, 2024
@seniorm0ment
Copy link
Author

seniorm0ment commented Jan 4, 2024

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.

@Aga-C
Copy link
Member

Aga-C commented Jan 4, 2024

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?

@seniorm0ment
Copy link
Author

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.

@OmlineEditor
Copy link

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.

@Aga-C Aga-C added the needs triage Issue is not yet ready for PR authors to take up label Mar 13, 2024
@Aga-C Aga-C mentioned this issue Aug 26, 2024
7 tasks
@Aga-C Aga-C removed device/software specific Issues that only happen on some devices or with some specific hardware/software needs triage Issue is not yet ready for PR authors to take up labels Oct 11, 2024
@Aga-C
Copy link
Member

Aga-C commented Oct 11, 2024

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.

@rafnov
Copy link

rafnov commented Oct 13, 2024

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.

@GfEW
Copy link

GfEW commented Oct 13, 2024

@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.

@rafnov
Copy link

rafnov commented Oct 13, 2024

Unfortunately it is the second free gallery I have to stop using, at least until the obvious issue is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

5 participants