How to use GitHub
- Please use the 👍 reaction 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
How to use GitHub
DisplayUtils.setThumbnailis currently used to load thumbnails in the file listing, and it is tied to theonBindViewHoldermethod ofOCFileListAdapter.However,
setThumbnailperforms 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:
The adapter would then simply display already-prepared thumbnails instead of triggering the full thumbnail logic during each bind.
Note
Planning needed before implementation