mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-05 04:32:52 +00:00
* Don't lock while calling downloader Addresses #2785 To avoid performance issues, we should avoid locking the downloader. To achieve this we need to do some kinda gross things. Essentially the cost is the code is more complex and potentially far less performant in edge cases. In testing, edge cases are nearly never hit, but I'm not sure how good I feel about the cost in code complexity. This exacerbates the locking issues in ASNetworkImageNode: 1. There is no convention for which methods lock. 2. There's no indication which vars are only set on init and therefore safe to access except in the class extension definition. * Shouldn't have checked in product changes. * Using ivar instead of local var copied within lock.
22 KiB
Executable File
22 KiB
Executable File