Skip to content

Fix gallery performance by downsampling thumbnails - #17

Closed
shawonashraf wants to merge 5 commits into
mainfrom
cursor/fix-gallery-thumbnails-5c4c
Closed

Fix gallery performance by downsampling thumbnails#17
shawonashraf wants to merge 5 commits into
mainfrom
cursor/fix-gallery-thumbnails-5c4c

Conversation

@shawonashraf

@shawonashraf shawonashraf commented Apr 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace full-image decoding in ImageCardView with ImageIO thumbnail downsampling
  • add an in-memory thumbnail cache keyed by file path and target thumbnail size
  • pass gallery zoom-driven pixel target into each card so thumbnails scale with UI density
  • keep ImageCardView source-compatible via an explicit initializer with a default thumbnail size so both 2-arg and 3-arg call sites compile
  • guard async thumbnail tasks from applying stale results after zoom changes
  • break large GalleryView image-card/context-menu expression into smaller helpers to resolve Swift type-checker timeout

Testing

  • xcodebuild -project Wardrobe.xcodeproj -scheme Wardrobe build (blocked in cloud Linux environment: xcodebuild: command not found)

Fixes #7

Open in Web Open in Cursor 

cursoragent and others added 5 commits April 25, 2026 16:01
Co-authored-by: Shawon Ashraf <shawon.ashraf@outlook.com>
Co-authored-by: Shawon Ashraf <shawon.ashraf@outlook.com>
Co-authored-by: Shawon Ashraf <shawon.ashraf@outlook.com>
Co-authored-by: Shawon Ashraf <shawon.ashraf@outlook.com>
Co-authored-by: Shawon Ashraf <shawon.ashraf@outlook.com>
@shawonashraf
shawonashraf deleted the cursor/fix-gallery-thumbnails-5c4c branch April 25, 2026 16:21
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.

Gallery load thumbnails

2 participants