react-native/React/Profiler
Nick Lockwood 34ec6a91a9 Move setBridge: off main thread
Summary:
Previously, if a module implemented `setBridge:` we assumed that it needs to be initialised on the main thread. This assumption was not really warranted however, and it was a barrier to deferring module initialization.

This diff tweaks the rules so that only modules that override `init` or `constantsToExport**` are assumed to require main thread initialization, and others can be created lazily when they are first used.

WARNING: this will be a breaking change to any 3rd party modules that are assuming `setBridge:` is called on the main thread. Those modules should be rewritten to move any code that requires the main thread into `init` or `constantsToExport` instead.

`**` We will also be examining whether `constantsToExport` can be done lazily, but for now any module that uses it will still be created eagerly when the bridge starts up.

Reviewed By: javache

Differential Revision: D3240682

fb-gh-sync-id: 48f309e3158bbccb52141032baf70def3e609371
fbshipit-source-id: 48f309e3158bbccb52141032baf70def3e609371
2016-05-03 09:09:21 -07:00
..
RCTFPSGraph.h Introduce Perf Monitor 2015-10-23 10:56:56 -07:00
RCTFPSGraph.m Introduce Perf Monitor 2015-10-23 10:56:56 -07:00
RCTJSCProfiler.h Introduce JSC profiler API 2015-12-15 03:12:32 -08:00
RCTJSCProfiler.m Added throttling on requests made by RCTImageLoader 2016-02-16 12:42:34 -08:00
RCTMacros.h Prevent RCTProfileTrampoline from getting stripped 2015-10-27 13:03:28 -07:00
RCTPerfMonitor.m Move setBridge: off main thread 2016-05-03 09:09:21 -07:00
RCTProfile.h Add systrace controls window 2016-03-11 06:21:26 -08:00
RCTProfile.m Add more performance logs and Systrace events for RAM and bridge startup 2016-04-01 07:25:38 -07:00
RCTProfileTrampoline-arm.S Use indirect jumps on armv7 2016-04-04 06:49:19 -07:00
RCTProfileTrampoline-arm64.S Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTProfileTrampoline-i386.S Refactored module access to allow for lazy loading 2015-11-25 04:49:45 -08:00
RCTProfileTrampoline-x86_64.S Preserve all return registers on x86_64 trampoline 2015-12-07 06:43:28 -08:00