Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow disable fade-in of thumbnails when scrolling #136

Closed
6 of 7 tasks
CurbedLarry opened this issue Feb 17, 2024 · 9 comments
Closed
6 of 7 tasks

Allow disable fade-in of thumbnails when scrolling #136

CurbedLarry opened this issue Feb 17, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@CurbedLarry
Copy link

Checklist

  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one feature request.
  • I have read and understood the contribution guidelines.
  • I optionally donated to support the Fossify mission.

Feature description

Allow disable fade-in of thumbnails to increase scrolling speed, reduce CPU/GPU use

Why do you want this feature?

Main issue stopping me moving on from QuickPic is sluggish scrolling of thumbnails, especially on older/slower devices. This appears to be because thumbnails fade into view from black. I assume this was an aesthetic choice and not for some other technical reason? On faster/recent devices the fade-in effect isn't that noticeable so I think it adds little value.

My hope is the effect could be made optional in the settings?

Additional information

No response

@CurbedLarry CurbedLarry added feature request Issue is about a new feature in the app needs triage Issue is not yet ready for PR authors to take up labels Feb 17, 2024
@Aga-C Aga-C added enhancement New feature or request and removed feature request Issue is about a new feature in the app needs triage Issue is not yet ready for PR authors to take up labels Feb 17, 2024
@gmasil
Copy link
Contributor

gmasil commented Feb 18, 2024

Related: SimpleMobileTools/Simple-Gallery#2796
My impression is that loading is actually slow, it is more apparent without the fade-in.

@CurbedLarry
Copy link
Author

@gmasil Thanks for linking to the previous request.

Have noticed QuickPic is creating smaller thumbnails which surely helps. For the same ~3,000 images QuickPic has a cache of 93MB and Gallery 229MB. You really have to look closely at thumbnails with text to notice the difference on screen.

Cache size has been raised before I don't think anyone suggested a thumbnail quality setting or just reducing size/quality to benefit performance?

QuickPic
QuickPic-Thumbnail
Gallery
Fossify-Gallery-Thumbnail

@gmasil
Copy link
Contributor

gmasil commented Feb 18, 2024

Hi, that's a good point. I turned down the thumbnail resolution, but it didn't seem to have an impact.
I started a branch here to investigate: https://github.com/gmasil/Fossify-Gallery/tree/investigate-slow-image-scrolling
There is some lazy loading mechanism that I turned off and increased the prefetching of images during scrolling.
Sadly this is running on the UI thread and thus introduces a stuttering UI during the eager thumbnail loading. Once all images are loaded the scrolling is very fast and smooth.

@CurbedLarry
Copy link
Author

CurbedLarry commented Feb 20, 2024

I can't help with coding but happy to test APKs.

I've tested a couple of other galleries including Aves (https://github.com/deckerst/aves/). The UI is awful and it's very slow creating thumbnails but after that it has fast pop-up of thumbnails when scrolling. It's hard to make the screen go entirely black, even when throwing the scroll bar up/down.

Can anything be learned from their code?

@naveensingh
Copy link
Member

I have reduced the fade-in duration from 300ms to 150ms in version 1.1.3 but as @gmasil pointed out above, it is the image loader that needs to be optimized. Running the code on the main thread isn't helping either.

@CurbedLarry
Copy link
Author

@naveensingh Thanks, I've tested the change on 4 devices and think there's a small improvement on most. On the oldest/slowest device (2015 mid-spec tablet) there's more stuttering compared to an old version of SMT Gallery.

So I can see why the delay was set quite high to help older devices. My other high-end devices from 2016-2019 are OK so hopefully most users today won't see any stuttering.

Is the image loader something that can be optimised? Do you think there's any potential boost from a smaller thumbnail size?

@BluePixel4k
Copy link

@naveensingh thank you for the improvement!
But could you please add a setting to disable the fade-in duration completely? Thx :)

@naveensingh naveensingh self-assigned this Sep 24, 2024
@naveensingh
Copy link
Member

sluggish scrolling of thumbnails

This should be fixed in the next update. There was a (unnecessary) lazy loading mechanism that delayed loading by 100 milliseconds.

I have also conditionally disabled fade-in animation when loading from cache because it usually is instantaneous on most devices.

@CurbedLarry
Copy link
Author

Just tested v1.2.1 and loading/scrolling is so fast now! As fast as any gallery I've tested, great work!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants