* Optimize ASCATransactionQueue. This queue is very busy, and it runs on the main thread so it's important for it to be fast.
Avoid waking up the run loop for every single node.
Avoid a ton of NSPointerArray overhead that we don't need.
Avoid retain/release traffic on the singleton by using an inline function. I confirmed that in release mode, the static __strong is correctly inlined and no ARC traffic is incurred.
* Comment
* Unlock right
* Remove magic number
* Revert node call, useless, the node has a ASDisplayView, and this view forward on the node in first.
* Use convertPoint to convert the given point in hittest & pointInside methods.
Keep the standard usage if the node didn't rasterized a view.
* Removed isNodeLoaded, finally it's useless in this case
In these methods, we are on the mainThread, we can create the view if the view is not created.
* Optimize _assertSubnodeState
This method is actually pretty painful in today's world. In one iPad mini trace, the first page of nodes spent 6.6ms in this call, just in time profiler.
* Clean it up, check count
* Check the right value
* Optimize ASTwoDimensionalArrayUtils
These methods are called on the main thread during range controller updates (i.e. every frame) and so they should be as fast as possible.
* Rename
* Use vector instead of stack array to handle really big cases (e.g. photos)
* Lock up to yogaRoot during layout to avoid dead lock.
1) lock to root for tree
2) lock self to change parent (& consequently root)
3) Implement ASLocking (tryLock) on ASNodeController
4) add lockPair to try-lock node & controller together
5) lock controllers if they exist in lockToRoot...
Disable some asserts due to lock to root. :(
LL# No commands remaining.
* Add macro so non-Yoga still builds :)
* wut
* Update containers-overview.md
* Update subclassing.md
* Update node-overview.md
ASImageNode, ASNetworkImageNode and ASMultiplexImageNode are in place of UIImageView, not UIImage.
* Add an experimental flag to use native dispatch_apply instead of our core count * 2 approach. This has shown performance wins in some profiling.
* Add in other places
* Improve separation of code for layout method types
* Address PR comments
- Delegate to layout spec engine if the node is a layout spec node but yoga engine was asked for calculate the layout
- Change ASLayoutType to ASLayoutEngineType
- Improve layout engine fall through code
* Add experiment to skip waiting until all updates of collection/table view are committed in -accessibilityElements
The wait was introduced in #1217 which blocks the main thread until updates are proccessed. We suspect this causes perf regressions accross the app and need to confirm this via an experiment.
* Add option to skip default behavior of ASCellLayoutMode
* Fix unit test
* Fix unit test in another way
* Remove import
* Minor change
* Add ASCellLayoutModeSyncForSmallContent
* Update unit tests
* Remove unnecessary change
* Remove unnecessary changes
Initializing the LUT arrays at file level scope creates a large chunk of code retaining and releasing all of the NSStrings in the tables. Moving them to function level moves the initialization to being lazy.
As of today, ASRangeController doesn't manage the interfaceState for supplementary nodes. This bug was introduced with a refactoring of this code a couple months ago.
With this change, the supplementary nodes will automatically enter each interfaceState bit when they are added to a view hierarchy.
* Split up table view thrash tests
* Fix license
* Fix license
* Reenable thrash tests for table view
* Creating the collection view thrash tests
* Batch update animated tests
* Thrash wildly dispatch main
* Reset the thrash count
* One more test
* Lint
* Update Tests/ASThrashUtility.h
Co-Authored-By: mikezucc <mikezuccarino@gmail.com>
* Tiny code style change in ASCollectionViewThrashTests.mm