nextcloud / nextcloud/android

Thumbnail Generation For File Listing

Open
#16,798 0 comments 0 reactions 1 assignee Claimed by @alperozturk96 View on GitHub
0. Needs triage enhancement performance 🚀
Dominant language
Kotlin
Stars
5.6k
Forks
2k
Avg merge
2d 18h
Merged PRs (30d)
92

Description

### How to use GitHub

* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.

`DisplayUtils.setThumbnail` is currently used to load thumbnails in the file listing, and it is tied to the `onBindViewHolder` method of `OCFileListAdapter`.

However, `setThumbnail` performs multiple checks and triggers asynchronous operations, making it inefficient when called repeatedly during binding.

To improve this, we could introduce a separate component responsible for preparing thumbnails for all files in advance. This component would:

* Preload or generate thumbnails for the entire list after a directory swap
* Update thumbnails for individual files when changes occur

The adapter would then simply display already-prepared thumbnails instead of triggering the full thumbnail logic during each bind.

### Note

Planning needed before implementation

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.