mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[ASDisplayNode] Always layout nodes on a background thread (#1907)
* Always layout nodes on a background thread * Remove semaphore in ASDataController for allocating nodes and layout * Fix variable not used error * Remove overhead to create subarray of contexts of nodes while layout nodes * Remove extra allocation of allocatedNodes and indexPaths array
This commit is contained in:
committed by
appleguy
parent
f95790f280
commit
a8c5ac138d
@@ -791,7 +791,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
|
||||
};
|
||||
|
||||
// TODO ihm: Can we always push the measure to the background thread and remove the parameter from the API?
|
||||
if (shouldMeasureAsync) {
|
||||
if (ASDisplayNodeThreadIsMain()) {
|
||||
ASPerformBlockOnBackgroundThread(transitionBlock);
|
||||
} else {
|
||||
transitionBlock();
|
||||
|
||||
Reference in New Issue
Block a user