katagaki / IllustMate

Simple photo organizer for iOS written in SwiftUI.
5 stars 0 forks source link

Consider generating and caching thumbnails locally using NSFileCoordinator #63

Open katagaki opened 1 year ago

katagaki commented 1 year ago
  1. Use a single global OperationQueue.
  2. On appear/task of IllustrationLabel, call NSFileCoordinator to add a new task to the queue.
  3. In the NSFileCoordinator closure, set the IllustrationLabel's state to update it with the actual thumbnail.
  4. At the same time, cache the thumbnails somewhere (locally in documentsDirectory?).

This might work in theory, but the id getter and SwiftData conflict may still cause freezes during loading.