Skip to content
Permalink
Browse files

Start measuring RCTPLBridgeStartup and RCTPLTTI early

Reviewed By: javache

Differential Revision: D3828404

fbshipit-source-id: 7cbfa2eeb60e249be8aad09da5314be998213f0e
  • Loading branch information...
alexeylang authored and Facebook Github Bot 8 committed Sep 8, 2016
1 parent c3b4136 commit 532751f8a835e2c2f093f8eb3682b0a35b9e9720
Showing with 5 additions and 9 deletions.
  1. +1 −4 React/Base/RCTBatchedBridge.m
  2. +4 −5 React/Base/RCTBridge.m
@@ -69,13 +69,10 @@ - (instancetype)initWithParentBridge:(RCTBridge *)bridge
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
*/
@@ -174,11 +174,6 @@ - (void)bindKeys
#endif
}

- (RCTPerformanceLogger *)performanceLogger
{
return self.batchedBridge.performanceLogger;
}

- (NSArray<Class> *)moduleClasses
{
return self.batchedBridge.moduleClasses;
@@ -239,6 +234,10 @@ - (void)setUp
{
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];

0 comments on commit 532751f

Please sign in to comment.
You can’t perform that action at this time.