From 70066ecd2bbb06fb23de2add5e59c1332c5e33a6 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Tue, 15 May 2018 13:08:46 -0700 Subject: [PATCH] RN: Remove ReactPerf References Reviewed By: fkgozali Differential Revision: D8002194 fbshipit-source-id: a60073698d0f348d788b5c67e1c1c0010f7ec7f1 --- .../Interaction/InteractionStallDebugger.js | 6 +--- .../Interaction/ReactPerfStallHandler.js | 34 ------------------- 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 Libraries/Interaction/ReactPerfStallHandler.js diff --git a/Libraries/Interaction/InteractionStallDebugger.js b/Libraries/Interaction/InteractionStallDebugger.js index 192d1eeed..899eee0ec 100644 --- a/Libraries/Interaction/InteractionStallDebugger.js +++ b/Libraries/Interaction/InteractionStallDebugger.js @@ -12,15 +12,11 @@ const BridgeSpyStallHandler = require('BridgeSpyStallHandler'); const JSEventLoopWatchdog = require('JSEventLoopWatchdog'); -const ReactPerfStallHandler = require('ReactPerfStallHandler'); const InteractionStallDebugger = { - install: function(options: {thresholdMS: number}) { + install(options: {thresholdMS: number}): void { JSEventLoopWatchdog.install(options); BridgeSpyStallHandler.register(); - if (__DEV__) { - ReactPerfStallHandler.register(); - } }, }; diff --git a/Libraries/Interaction/ReactPerfStallHandler.js b/Libraries/Interaction/ReactPerfStallHandler.js deleted file mode 100644 index bdeaed21d..000000000 --- a/Libraries/Interaction/ReactPerfStallHandler.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -const JSEventLoopWatchdog = require('JSEventLoopWatchdog'); -const ReactPerf = require('ReactPerf'); - -const ReactPerfStallHandler = { - register: function() { - ReactPerf.start(); - JSEventLoopWatchdog.addHandler({ - onStall: () => { - ReactPerf.stop(); - ReactPerf.printInclusive(); - ReactPerf.printWasted(); - ReactPerf.start(); - }, - onIterate: () => { - ReactPerf.stop(); - ReactPerf.start(); - }, - }); - }, -}; - -module.exports = ReactPerfStallHandler;