From 1419941f8ea44019938c39d06af0bc167d0bdc60 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Thu, 9 Jul 2015 07:26:54 -0700 Subject: [PATCH] [ReactNative] Log with `RCTPerformanceLogger` only once per bridge instance Summary: Fixes #1809 Even if a bridge has more than one root view, it's not supported by the js side right now, and it will keep warning that those timespans had already been recorded. --- React/Base/RCTPerformanceLogger.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/React/Base/RCTPerformanceLogger.m b/React/Base/RCTPerformanceLogger.m index b43ab2252..c19f4938a 100644 --- a/React/Base/RCTPerformanceLogger.m +++ b/React/Base/RCTPerformanceLogger.m @@ -64,6 +64,8 @@ RCT_EXPORT_MODULE() - (void)sendTimespans { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [_bridge enqueueJSCall:@"PerformanceLogger.addTimespans" args:@[ RCTPerformanceLoggerOutput(), @[