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

pre-cache picture thumbnails #4496

Open
ghost opened this issue Sep 13, 2019 · 11 comments
Open

pre-cache picture thumbnails #4496

ghost opened this issue Sep 13, 2019 · 11 comments
Labels
enhancement feature: previews and thumbnails performance 🚀 Performance improvement opportunities (non-crash related)

Comments

@ghost
Copy link

ghost commented Sep 13, 2019

Hi.

I would like the option that NC android client can pre cache the thumbnails for certain folders. This would make the user experience much better.

In my work flow I import many photos from my DSLR camera on the desktop, but I would like to view and share them on the phone. Even if I to occ preview:generate-all, the download speed of thumbnails is too slow to do on-demand only. Specifying folders to keep thumbnails in sync (but not the data!) would greatly improve the situation.

@ghost ghost added the enhancement label Sep 13, 2019
@tobiasKaminsky
Copy link
Member

I had something similar in mind, but having an option for that is too techy, in my opinion.
Better would be something like:

  • have a background job that runs every 15 min when on wifi (to not consume mobile data)
  • get a list of changed images/previewable files
  • check for outdated thumbnails
  • download them

This would then also require that cache might increase beyond 200mb (which is currently hard limited, but I guess in modern devices we can use a better max value, eg. based on free disk space, etc.)

@tobiasKaminsky
Copy link
Member

Same would also be true for entire file structure, when assuming that ~80% of files are changed very very rarely on private instances.

@ghost
Copy link
Author

ghost commented Sep 13, 2019

Yes. Of course. But syncing all thumbs by default might take to much storage space on the phone if the user has many files. But having this as an option would be very valuable.

With a low jpeg quality, 200MB could store 20.000 thumbs. Pretty much I suppose. Though myself have 100k photos and many more document type files.

@AndyScherzinger
Copy link
Member

If we simply pre-fecth based on the loader logic of the photos-view we could do such a thing which basically translates to loading the latest n image thumbnails.

@ghost
Copy link
Author

ghost commented Sep 27, 2019

Not sure I follow. "latest n image thumbnails". Do you mean to schedule downloading small sets odd thumbs in the background?

@Whisprin
Copy link

Whisprin commented Oct 14, 2019

Found this old issue that seems related: #177

I think photos and videos are one of the main use cases for people on their phones. Maybe it makes sense to give a bit more control to the user about keeping smaller versions(/thumbnails) of their media on the phone as suggested here: #1490

The logic for the use cases may be very similar.

@acloudadmin
Copy link

Hi. Great app -- very useful.

Like to add my support for improving the thumbnail cache. I have 15k photos and lots and lots of room on my phone - more than enough room to cache thumbnails for all. This would make the app SOOO much more useful to me.

If I had the option, I 'd love to be able to set my own cache-size limit, and perhaps even prot CT the cache from being cleaned out by any routine android cache-cleaning protocols (of such things exist).

Thanks again for all your work on this.

@tobiasKaminsky
Copy link
Member

Regarding cache size: #596
I know it is outdated, but maybe we can research if an unlimited cache size is possible.
(Android allows to clean cache, if device runs out of space, so we need not to limit it arbitrary)

@FlashyDuck
Copy link

FlashyDuck commented Feb 8, 2022

This is really a missing feature that kills the experience. I've transferred a few users from icloud to my nextcloud server and this is the biggest complaint that I got. Although I have Previewgenerator installed and all, but still; the app only loads/downloads thumbnails that the user is viewing. Large folders to scroll through (1000+ pictures) is a real pain.

@shaun-ba
Copy link

shaun-ba commented Jun 6, 2022

I agree this is just stupid, give the user control of this...

I cannot even view a pretty small folder of photos, the client says 78mb used and has a red bar at the bottom. Naturally I went to settings to increase the cache and was shocked to find that isn't an option.

@tobiasKaminsky
Copy link
Member

Glide, one of the most used image loading library, is also using a 250Mb fixed LRU (least-recently-used) cache.
https://bumptech.github.io/glide/doc/configuration.html#disk-cache

I suspect that there is a misunderstanding between cache and and waiting for thumbnail:
our cache size is set to 200Mb, so it can hold up to 4000 images (given one preview has ~50kb, or even more thubmnails).

If you browse a large folder and you have to wait for thumbnails/preview to be shown, this is because server needs to generate it, which takes time.

Thumbnails: little square images
Preview: screen adjusted images when you click on an image

@joshtrichards joshtrichards changed the title Enhancement: pre-cache picture thumbnails pre-cache picture thumbnails Oct 16, 2023
@joshtrichards joshtrichards added the performance 🚀 Performance improvement opportunities (non-crash related) label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature: previews and thumbnails performance 🚀 Performance improvement opportunities (non-crash related)
Projects
None yet
Development

No branches or pull requests

7 participants