Grand Central Dispatch (GCD), How Yelp uses GCD
summary
Yelp runs on Grand Central Dispatch to keep UI responsive across 83M monthly mobile visitors; the demo moves image scaling off the main thread, cutting viewWillAppear from 0.06s to 0.03s by switching from a serial to a concurrent queue and using a dispatch_group_notify completion. Independent video tasks use dispatch_group_enter/leave or the convenience dispatch_group_async to avoid flags. Serializing animations uses a serial queue targeted at the main queue with dispatch_suspend/resume. Caveats: deallocating groups crashes, enqueued queues are retained, and GCD has no cancel support.
AI-written summary · about
chapters (34)
- 0:00Intro
- 0:30About Yelp
- 1:08What is GCD
- 1:49Blocks
- 2:25Block
- 2:40GCD
- 3:09Open Source
- 4:07Agenda
- 4:29Scheduling a task
- 5:19Serial queue example
- 5:39Concurrent queue example
- 6:31Create queue
- 8:20Quality of service
- 9:13Concurrent cues
- 10:37Global queues
- 12:39Queue concurrency scheme
- 13:23How to use tasks
- 14:13Main queue
- 15:02Loading spinner
- 15:22Demo app
- 20:07User Generated Video
- 21:07Common Solution
- 21:28Getting Messy
- 21:52Dispatch Groups
- 22:35Dispatch Group Code
- 24:13Dispatch to be notified
- 24:42Concurrency
- 27:38asynchronous tasks
- 28:34animation example
- 28:58Animation API
- 29:31Animation Queue
- 33:33Caveats
- 35:00Tasks
- 35:46Dispatch Barrier API
related talks
41mIntroduction to Concurrent Algorithms with Grand Central Dispatch
29mComparative Asynchronous Programming
11mImproving App Performance With Custom Thread Pools
01h 08mBetter Code: Concurrency
47mQueues, Fairness, and The Go Scheduler
42mKotlin Multiplatform multithreading old and new way
38mKotlin coroutines
28mConcurrency for Imposters
