Start measuring RCTPLBridgeStartup and RCTPLTTI early

Reviewed By: javache

Differential Revision: D3828404

fbshipit-source-id: 7cbfa2eeb60e249be8aad09da5314be998213f0e
This commit is contained in:
Alexey Lang 2016-09-08 07:26:41 -07:00 committed by Facebook Github Bot 8
parent c3b4136d93
commit 532751f8a8
2 changed files with 5 additions and 9 deletions

View File

@ -69,13 +69,10 @@ RCT_EXTERN NSArray<Class> *RCTGetModuleClasses(void);
moduleProvider:bridge.moduleProvider
launchOptions:bridge.launchOptions]) {
_parentBridge = bridge;
_performanceLogger = [bridge performanceLogger];
RCTLogInfo(@"Initializing %@ (parent: %@, executor: %@)", self, bridge, [self executorClass]);
_performanceLogger = [RCTPerformanceLogger new];
[_performanceLogger markStartForTag:RCTPLBridgeStartup];
[_performanceLogger markStartForTag:RCTPLTTI];
/**
* Set Initial State
*/

View File

@ -174,11 +174,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
#endif
}
- (RCTPerformanceLogger *)performanceLogger
{
return self.batchedBridge.performanceLogger;
}
- (NSArray<Class> *)moduleClasses
{
return self.batchedBridge.moduleClasses;
@ -239,6 +234,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
{
RCT_PROFILE_BEGIN_EVENT(0, @"-[RCTBridge setUp]", nil);
_performanceLogger = [RCTPerformanceLogger new];
[_performanceLogger markStartForTag:RCTPLBridgeStartup];
[_performanceLogger markStartForTag:RCTPLTTI];
// Only update bundleURL from delegate if delegate bundleURL has changed
NSURL *previousDelegateURL = _delegateBundleURL;
_delegateBundleURL = [self.delegate sourceURLForBridge:self];