Skip to content

Fix: Large folders with many PDFs load slowly - #80

Merged
MemerGamer merged 1 commit into
mainfrom
linux/perf3
Oct 5, 2026
Merged

MemerGamer merged 1 commit into
mainfrom
linux/perf3

Conversation

@MemerGamer

Copy link
Copy Markdown
Owner

Findings

  • Root cause of the "never finishes loading" Downloads: Files groups Downloads by date created by default, and Uno's grouped CollectionView renders no rows. The headless repro (301 items: PDF/PNG/ZIP/DOCX/XLSX/JPG) showed an empty list for 45s+ even though the status bar counted the items; any ungrouped folder of the same size listed within ~2s. The default is now skipped on Linux (LINUX-TODO(listing) left for grouped rendering generally; manually chosen grouping is untouched and still affected).
  • Thumbnails were already lazy (realized rows only), bounded (service gate 1-4), and served from the shared freedesktop cache first. Hardened: the cache lookup did synchronous file reads on the UI thread (now Task.Run), the item-load cancellation token is forwarded so scrolled-away or navigated-away requests stop waiting on the gate, and settle-pass loads are capped at 4 parallel.
  • Per-zip inspection and extended properties are not done during listing. The CloseWatcher line was once per navigation (not a loop in the sandbox); it is now Debug level. I could not reproduce a watcher open/close loop headless, so real-desktop churn (e.g. an active download or inotify overflow triggering full refresh) is unconfirmed.

Measured (headless, Xvfb, nice 19, software rendering)

  • Before: Downloads blank >45s (Details and Grid). After: rows visible in ~2-3s; generic icons first, PDF/JPG thumbnails fill in for visible rows over ~5-14s with 4 concurrent generations.

Tests: Files.Platform.Tests 864 passed, 7 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LeKXJc3DnK3PzAqwgA72NY

…he UI thread

Downloads defaulted to grouping by date created, and Uno's grouped
CollectionView renders no rows, so the listing never appeared. Skip that
default on Linux. Thumbnail cache lookups now run off the UI thread and honour
the item-load cancellation token, realized-row loads are capped at 4 in
parallel, and the CloseWatcher log line is Debug level.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MemerGamer
MemerGamer merged commit 57f9e4a into main Oct 5, 2026
5 of 6 checks passed
@MemerGamer
MemerGamer deleted the linux/perf3 branch October 5, 2026 21:08
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