Skip to content

Commit be61447

Browse files
committed
Avoid double logging component render time (#32749)
This got moved into the functional component and class component case statements here: 0de1233. So that we could separate the error case for class components. However, due to a faulty rebase this got restored at the top as well. Leading to double component renders being logged. In the other offscreen reconnect passes we don't do this in each case statement but still once at the top. The reason this doesn't matter is because use the PerformedWork flag and that is only set for function and class components. Although maybe it should be set for expensive DOM components too and then we have to remember this. DiffTrain build for [f9e1b16](f9e1b16)
1 parent 0c45045 commit be61447

35 files changed

+427
-517
lines changed

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 301 additions & 291 deletions
Large diffs are not rendered by default.

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4845e16c22caf27334a1eab712ed258a9ae09752
1+
f9e1b16098f2ff4ed483285219b07066525796b6
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4845e16c22caf27334a1eab712ed258a9ae09752
1+
f9e1b16098f2ff4ed483285219b07066525796b6

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.1.0-www-classic-4845e16c-20250325";
1540+
exports.version = "19.1.0-www-classic-f9e1b160-20250325";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1537,7 +1537,7 @@ __DEV__ &&
15371537
exports.useTransition = function () {
15381538
return resolveDispatcher().useTransition();
15391539
};
1540-
exports.version = "19.1.0-www-modern-4845e16c-20250325";
1540+
exports.version = "19.1.0-www-modern-f9e1b160-20250325";
15411541
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
15421542
"function" ===
15431543
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-classic-4845e16c-20250325";
644+
exports.version = "19.1.0-www-classic-f9e1b160-20250325";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,4 +641,4 @@ exports.useSyncExternalStore = function (
641641
exports.useTransition = function () {
642642
return ReactSharedInternals.H.useTransition();
643643
};
644-
exports.version = "19.1.0-www-modern-4845e16c-20250325";
644+
exports.version = "19.1.0-www-modern-f9e1b160-20250325";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-classic-4845e16c-20250325";
648+
exports.version = "19.1.0-www-classic-f9e1b160-20250325";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
645645
exports.useTransition = function () {
646646
return ReactSharedInternals.H.useTransition();
647647
};
648-
exports.version = "19.1.0-www-modern-4845e16c-20250325";
648+
exports.version = "19.1.0-www-modern-f9e1b160-20250325";
649649
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
650650
"function" ===
651651
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12347,20 +12347,10 @@ __DEV__ &&
1234712347
endTime
1234812348
) {
1234912349
var prevEffectStart = pushComponentEffectStart(),
12350-
prevEffectErrors = pushComponentEffectErrors();
12351-
enableComponentPerformanceTrack &&
12352-
0 !== (finishedWork.mode & 2) &&
12353-
0 < finishedWork.actualStartTime &&
12354-
0 !== (finishedWork.flags & 1) &&
12355-
logComponentRender(
12356-
finishedWork,
12357-
finishedWork.actualStartTime,
12358-
endTime,
12359-
inHydratedSubtree
12360-
);
12361-
var isViewTransitionEligible = enableViewTransition
12362-
? (committedLanes & 335544064) === committedLanes
12363-
: !1;
12350+
prevEffectErrors = pushComponentEffectErrors(),
12351+
isViewTransitionEligible = enableViewTransition
12352+
? (committedLanes & 335544064) === committedLanes
12353+
: !1;
1236412354
isViewTransitionEligible &&
1236512355
null === finishedWork.alternate &&
1236612356
null !== finishedWork.return &&
@@ -18474,10 +18464,10 @@ __DEV__ &&
1847418464
(function () {
1847518465
var internals = {
1847618466
bundleType: 1,
18477-
version: "19.1.0-www-classic-4845e16c-20250325",
18467+
version: "19.1.0-www-classic-f9e1b160-20250325",
1847818468
rendererPackageName: "react-art",
1847918469
currentDispatcherRef: ReactSharedInternals,
18480-
reconcilerVersion: "19.1.0-www-classic-4845e16c-20250325"
18470+
reconcilerVersion: "19.1.0-www-classic-f9e1b160-20250325"
1848118471
};
1848218472
internals.overrideHookState = overrideHookState;
1848318473
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -18511,7 +18501,7 @@ __DEV__ &&
1851118501
exports.Shape = Shape;
1851218502
exports.Surface = Surface;
1851318503
exports.Text = Text;
18514-
exports.version = "19.1.0-www-classic-4845e16c-20250325";
18504+
exports.version = "19.1.0-www-classic-f9e1b160-20250325";
1851518505
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1851618506
"function" ===
1851718507
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)