4a7ba9b3324a1a0ba97a4b08f4972e12c957261e
Replace full [PhotoAsset] array enumeration with PHFetchResult batch enumeration (autoreleasepool + Task.yield per batch) to keep memory bounded during reconciliation. Introduce ManifestIndex with two O(1) Set<String> lookups (localIdentifier + lowercased filename) instead of O(n×m) linear scans. Scope manifest Data+struct inside buildManifestIndex so they are released by ARC before the comparison loop begins. Add UIApplication.didReceiveMemoryWarningNotification handler to cancel in-flight tasks under memory pressure. Separate debounceTask from refreshTask to avoid cancelling long-running reconciles on every photo library event. fetchResultForReconciliation returns PHFetchResult directly — no [PhotoAsset] array is ever allocated during reconciliation. Co-Authored-By: Kutesir <kutesir@provoc.ug> Co-Authored-By: Sentry <sentry@provoc.ug>
Description
Privacy-first iOS photo backup to NAS — SMB + SFTP, auto LAN trigger
Languages
Swift
100%