mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-18 19:40:19 +00:00
ASDISPLAYNODE_DELAY_DISPLAY unconditionally delays *all* attempts to execute display blocks, even those that have been cancelled. Fix that. The DELAY_DISPLAY debugging tool is intended to simulate the effect of expensive draw calls -- it lets you test your app's behaviour under conditions potentially even worse than an iPhone 4. Unfortunately, the current simulation is unusably incorrect, as can be demonstrated by repeatedly scrolling up and down in the Kittens example project. ASRangeController enqueues asynchronous display of ASTableView cell nodes when they enter the working range, and suspends their display when they exit. On a slow device, this performs as desired, limiting expensive display computation to the space of the working range. In the DELAY_DISPLAY simulation, the suspended displays are as expensive as the executed ones, so ASRangeController becomes unusably slow.