react-native/React
Nick Lockwood c55ca61396 Dispatch view creation immediately instead of waiting for layout
Summary:All UIManager operations that affect the view hierarchy are executed via the `addUIBlock:` method, which queues them up to be executed after layout has been completed on the shadow queue.

One of the most expensive view operations is view creation, but since this doesn't actually depend on layout, there's no reason to delay it until the shadow operations have finished.

This diff modifies the `createView` method to dispatch view creation directly to the main thread instead of adding it to the UIBlock queue. This seems to result a measurable improvement in TTI.

(Credit to astreet, for implementing the same idea on Android, and thanks to oli for telling me about it!)

Reviewed By: javache

Differential Revision: D3155709

fb-gh-sync-id: 3ad1da9a8fee687aa7e0e023d668192d94dba340
fbshipit-source-id: 3ad1da9a8fee687aa7e0e023d668192d94dba340
2016-04-11 05:06:20 -07:00
..
Base make `RCTEventDispatcher` dispatch events in incoming order 2016-04-05 09:17:28 -07:00
Executors Avoid crashing when executor is invalidated before it finishes loading RA Bundle 2016-04-08 07:34:28 -07:00
Layout Import css-layout measure mode changes from pull request #163 2016-04-07 10:16:30 -07:00
Modules Dispatch view creation immediately instead of waiting for layout 2016-04-11 05:06:20 -07:00
Profiler Use indirect jumps on armv7 2016-04-04 06:49:19 -07:00
React.xcodeproj Fix OSS project configuration 2016-03-30 03:12:27 -07:00
Views Use `loadRequest` instead of `reload` when initial load fails 2016-04-08 17:17:23 -07:00