부드럽고 빠른 앱을 만드는 데 필요한 동시성, 렌더링 최적화, Combine 학습 레포
Process vs Thread, RunLoop, Race Condition
동시성DispatchQueue, sync/async, serial/concurrent, DispatchGroup, Semaphore
동시성async/await, Task, async let, withCheckedContinuation
동시성Actor, MainActor, Sendable — 컴파일러 수준 Data Race 방지
동시성SwiftUI diff, Equatable, identity/lifetime/dependency
렌더링ImageIO 다운샘플링 (48MB → 0.04MB), NSCache, Prefetching
렌더링Publisher, Subscriber, debounce, combineLatest, flatMap
Combine// ❌ Before — 퍼플 경고, 크래시 가능 URLSession.shared.dataTask(with: url) { data, _, _ in self.imageView.image = UIImage(data: data!) // 백그라운드 스레드! }.resume() // ✅ After — async/await + @MainActor func loadImage() async throws { let (data, _) = try await URLSession.shared.data(from: url) await MainActor.run { self.imageView.image = UIImage(data: data) } }
// ❌ Before — 48MB let image = UIImage(data: try! Data(contentsOf: url)) // ✅ After — 0.04MB (1200배 절약) let image = downsample(imageAt: url, to: CGSize(width: 100, height: 100))