From c71fa46eb884c4075c2e1e039902f6f81268c48b Mon Sep 17 00:00:00 2001 From: Ruslan Shestopalyuk Date: Tue, 9 May 2023 13:56:10 -0700 Subject: [PATCH] Use global Performance instance in createPerformanceLogger (#37337) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37337 Changelog: [Internal] Removes usage of a local `Performance` instance, since this the global one is now safe to use. Reviewed By: christophpurrer Differential Revision: D45697243 fbshipit-source-id: 4f3f9798e79c15295094d5a4650af04db2856f60 --- .../Libraries/Utilities/createPerformanceLogger.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/react-native/Libraries/Utilities/createPerformanceLogger.js b/packages/react-native/Libraries/Utilities/createPerformanceLogger.js index 8891b4d1ac8..0c09c750c7f 100644 --- a/packages/react-native/Libraries/Utilities/createPerformanceLogger.js +++ b/packages/react-native/Libraries/Utilities/createPerformanceLogger.js @@ -16,7 +16,6 @@ import type { } from './IPerformanceLogger'; import * as Systrace from '../Performance/Systrace'; -import Performance from '../WebPerformance/Performance'; import infoLog from './infoLog'; const _cookies: {[key: string]: number, ...} = {}; @@ -27,9 +26,6 @@ const PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally // used to separate these internally from other marks/measures const WEB_PERFORMANCE_PREFIX = 'global_perf_'; -// TODO: Remove once T143070419 is done -const performance = new Performance(); - export const getCurrentTimestamp: () => number = global.nativeQPLTimestamp ?? global.performance.now.bind(global.performance);