Skip to content

Fix UI media - #4204

Merged
marinofaggiana merged 3 commits into
masterfrom
fix-ui-media
Jul 25, 2026
Merged

Fix UI media#4204
marinofaggiana merged 3 commits into
masterfrom
fix-ui-media

Conversation

@marinofaggiana

@marinofaggiana marinofaggiana commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

Improve Media grid scrolling performance by reducing synchronous filesystem work and removing redundant image prefetching.

Changes

  • Removed UICollectionViewDataSourcePrefetching image loading.
  • Replaced UIKit-driven prefetching with the existing cache-window loading mechanism.
  • Avoided synchronous preview reads from prefetchItemsAt while scrolling.
  • Reduced duplicate image-loading paths between collection view prefetching and the media cache window.
  • Simplified preview file validation while preserving the check for zero-byte files created by the File Provider extension.
  • Kept validation for all generated preview sizes: 256, 512, and 1024.
  • Optimized visible-cell updates by using the original indexPath instead of scanning all visible cells.
  • Prevented duplicate disk reads for the same ocId, etag, and preview size.
  • Moved fallback image loading to cancellable utility-priority tasks.
  • Ensured reused cells are updated only when their identifier still matches the requested media.
  • Preserved the fallback preview download and placeholder metadata hydration flow.

Result

The Media grid performs less filesystem I/O during scrolling, avoids duplicate image loads, and provides smoother scrolling while keeping preview generation and cache behavior unchanged.

馃 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Avoid clearing the media date while items are temporarily unavailable and bump the project build version.

Signed-off-by: Marino Faggiana <[email protected]>
Cache the visible media range and skip recalculating the navigation title when it has not changed.

Signed-off-by: Marino Faggiana <[email protected]>
Load media thumbnails with cancellable utility tasks and remove collection view prefetching. Reduce the in-memory image cache limit.

Signed-off-by: Marino Faggiana <[email protected]>
@marinofaggiana
marinofaggiana merged commit 6317244 into master Jul 25, 2026
4 checks passed
@marinofaggiana
marinofaggiana deleted the fix-ui-media branch July 25, 2026 07:57
@marinofaggiana marinofaggiana self-assigned this Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant