From 40ab77781cd0f01275a371eb40564a7583dc24db Mon Sep 17 00:00:00 2001
From: dan <dan.abramov@gmail.com>
Date: Wed, 8 Jan 2025 18:59:39 +0000
Subject: Delete <AppProfiler> (#7403)

---
 src/AppProfiler.tsx | 29 -----------------------------
 1 file changed, 29 deletions(-)
 delete mode 100644 src/AppProfiler.tsx

(limited to 'src/AppProfiler.tsx')

diff --git a/src/AppProfiler.tsx b/src/AppProfiler.tsx
deleted file mode 100644
index 31a4cc54e..000000000
--- a/src/AppProfiler.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import React, {Profiler} from 'react'
-
-// Don't let it get stripped out in profiling builds (which apply production Babel preset).
-const log = (global as any)['con' + 'sole'].log
-
-function onRender(id: string, phase: string, actualDuration: number) {
-  if (!__DEV__) {
-    // This block of code will exist in the production build of the app.
-    // However, only profiling builds of React call `onRender` so it's dead code in actual production.
-    const message = `<Profiler> ${id}:${phase} ${
-      actualDuration > 500
-        ? '(╯°□°）╯ '
-        : actualDuration > 100
-        ? '[!!] '
-        : actualDuration > 16
-        ? '[!] '
-        : ''
-    }${Math.round(actualDuration)}ms`
-    log(message)
-  }
-}
-
-export function AppProfiler({children}: {children: React.ReactNode}) {
-  return (
-    <Profiler id="app" onRender={onRender}>
-      {children}
-    </Profiler>
-  )
-}
-- 
cgit 1.4.1

