These optimizations are surprisingly impactful. -setNeedsDisplay being called
for every node triggered cancelAsyncDisplay, locking, and memory management overhead
that is completely avoidable because Core Animation triggers first display automatically.
The mutable array copy optimizations reduced this key cost by over 10x, from 52ms to 5ms
on an iPad Air 2 / A8X with a real-world test case.
- They are neither considered internally nor in tests. And when they are accidently considered, they cause tests to fail.
- Developers can easily set debugging names themselves whenever needed.
This helps us support special cases such as ASScrollNode correctly driving the -layout
method for subclasses even though it is based on UIScrollView & can't use _ASDisplayView.
I suspect this will be useful for ASCollectionNode and ASTableNode as well, which would
allow nesting those classes inside of other collections / tables (e.g. horizontal
unit within a vertical unit).