Skip to content

perf(files): load file previews asynchronously - #4210

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

perf(files): load file previews asynchronously#4210
marinofaggiana merged 3 commits into
masterfrom
media-ui-fix

Conversation

@marinofaggiana

@marinofaggiana marinofaggiana commented Jul 28, 2026

Copy link
Copy Markdown
Member

Summary

Improve scrolling performance in the Files view by loading local preview images asynchronously instead of performing synchronous disk reads on the main thread.

Changes

  • Move local preview loading to a background queue.
  • Display the file type placeholder immediately while the preview is being loaded.
  • Update the cell on the main thread once the preview becomes available.
  • Keep the existing fallback behavior for files without a generated preview.

Benefits

  • Smoother scrolling in large folders.
  • Reduced main-thread work during cell configuration.
  • Faster visual response by showing placeholders immediately while previews are loaded.

Fix

  • disable interaction for media section headers

🤖 AI (if applicable)

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

Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
Signed-off-by: Marino Faggiana <marino.faggiana@nextcloud.com>
@marinofaggiana marinofaggiana changed the title Media UI fix perf(files): load file previews asynchronously Jul 28, 2026
@marinofaggiana
marinofaggiana merged commit 2e47a09 into master Jul 28, 2026
4 checks passed
@marinofaggiana
marinofaggiana deleted the media-ui-fix branch July 28, 2026 14:13
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