diff --git a/React/Base/RCTBatchedBridge.m b/React/Base/RCTBatchedBridge.m index e3d9ea0d3..6b9bd6f15 100644 --- a/React/Base/RCTBatchedBridge.m +++ b/React/Base/RCTBatchedBridge.m @@ -896,6 +896,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR @autoreleasepool { for (NSNumber *indexObj in calls) { NSUInteger index = indexObj.unsignedIntegerValue; +#if RCT_PROFILE if (RCT_DEV && callID != -1 && self->_flowIDMap != NULL && RCTProfileIsProfiling()) { [self.flowIDMapLock lock]; int64_t newFlowID = (int64_t)CFDictionaryGetValue(self->_flowIDMap, (const void *)(self->_flowID + index)); @@ -903,6 +904,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithBundleURL:(__unused NSURL *)bundleUR CFDictionaryRemoveValue(self->_flowIDMap, (const void *)(self->_flowID + index)); [self.flowIDMapLock unlock]; } +#endif [self _handleRequestNumber:index moduleID:[moduleIDs[index] integerValue] methodID:[methodIDs[index] integerValue] diff --git a/React/Base/RCTPerformanceLogger.m b/React/Base/RCTPerformanceLogger.m index c1f990f41..99ec2b472 100644 --- a/React/Base/RCTPerformanceLogger.m +++ b/React/Base/RCTPerformanceLogger.m @@ -54,10 +54,12 @@ - (void)markStartForTag:(RCTPLTag)tag { +#if RCT_PROFILE if (RCTProfileIsProfiling()) { NSString *label = _labelsForTags[tag]; _cookies[tag] = RCTProfileBeginAsyncEvent(RCTProfileTagAlways, label, nil); } +#endif _data[tag][0] = CACurrentMediaTime() * 1000; _data[tag][1] = 0; } @@ -65,10 +67,12 @@ - (void)markStopForTag:(RCTPLTag)tag { +#if RCT_PROFILE if (RCTProfileIsProfiling()) { NSString *label =_labelsForTags[tag]; RCTProfileEndAsyncEvent(RCTProfileTagAlways, @"native", _cookies[tag], label, @"RCTPerformanceLogger", nil); } +#endif if (_data[tag][0] != 0 && _data[tag][1] == 0) { _data[tag][1] = CACurrentMediaTime() * 1000; } else {