10 Commits

Author SHA1 Message Date
ernestmama
6f44c3921e Remove experimental features (exp_skip_a11y_wait && exp_new_default_cell_layout_mode) (#1383)
* Remove experimental features

* prevent blocking main thread

* remove small content all together as none is the default

* Update ASExperimentalFeatures.h
2019-03-11 13:34:35 -07:00
Garrett Moon
9b80eabd8f Adds support for using UIGraphicsImageRenderer in ASTextNode. (#1384)
* Adds support for using UIGraphicsImageRenderer in ASTextNode.

In many cases this reduces the backing store of text nodes by 1/2.

* Guard for UIGraphicsRenderer availability.

* Comma
2019-03-09 07:55:46 -08:00
Huy Nguyen
d102ec81ee
Experiment with different strategies for image downloader priority (#1349)
Right now when an image node enters preload state, we kick off an image request with the default priority. Then when it enters display state, we change the priority to "imminent" which is mapped to the default priority as well. This means that requests from preload and display nodes have the same priority and are put to the same pool. The right behavior would be that preload requests should have a lower priority from the beginning.

Another problem is that, due to the execution order of -didEnter(Preload|Display|Visible)State calls, a node may kick off a low priority request when it enters preload state even though it knows that it's also visible. By the time -didEnterVisibleState is called, the low priority request may have already been consumed and the download/data task won't pick up the new higher priority, or some work needs to be done to move it to another queue. A better behavior would be to always use the current interface state to determine the priority. This means that visible nodes will kick off high priority requests as soon as -didEnterPreloadState is called.

The last (and smaller) issue is that a node marks its request as preload/low priority as soon as it exits visible state. I'd argue that this is too agressive. It may be reasonble for nodes in the trailing direction. Even so, we already handle this case by (almost always) have smaller trailing buffers. So this diff makes sure that nodes that exited visible state will have imminent/default priority if they remain in the display range.

All of these new behaviors are wrapped in an experiment and will be tested carefully before being rolled out.

* Add imports

* Fix build failure

* Encapsulate common logics into methods

* Address comments
2019-03-08 08:11:03 -08:00
Garrett Moon
fce6f23b97
Launches switching ASNetworkImageNode callbacks to global queue. (#1369)
* Launches switching ASNetworkImageNode callbacks to global queue.

* Good catch configuration tests!
2019-03-07 09:47:56 -08:00
Adlai Holler
efeb3d2749 Add an experimental flag to use native dispatch_apply (#1345)
* 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
2019-02-21 12:33:39 -08:00
Huy Nguyen
f1801388be
Add experiments to skip waiting for updates of collection and table views under some circumstances (#1311)
* 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
2019-01-24 10:13:54 -08:00
Huy Nguyen
17e56042d3
Add a way to opt out of always-clear-data behavior in ASCollectionView and ASTableView (#1284) 2018-12-20 13:47:58 -08:00
Max Wang
4d9d3c26d9 Disable a11y cache (#1274)
* disable a11y cache

* style update
2018-12-09 08:41:18 -08:00
Michael Schneider
ecfc7835da
Add experiment flag to skip layoutIfNeeded in enterPreloadState for ASM nodes (#1201) 2018-11-03 09:44:42 -07:00
Adlai Holler
d0ba092a77
Convert the codebase to Objective-C++ (#1206)
* Convert the codebase to Objective-C++ throughout. One language is better than two.

* Put it back

* Fix linker

* Point explicitly to updated Weaver to unblock build

* Revert "Point explicitly to updated Weaver to unblock build"

This reverts commit fdc25296e8794d4e6e56c35f5fe6da2be3f71dbc.

* Revert "Fix linker"

This reverts commit 7be25f91519b8497ef42de79f115bcfbdb965c39.

* Add in the frameworks

* no message

* Address spec lint warnings

* Fix tvos build

* Put that back

* Address Michael's review

* Add comment to kick CI
2018-11-02 12:04:14 -07:00