Skip to content

Commit db21584

Browse files
Andrei Shikovfacebook-github-bot
authored andcommitted
Remove soft error when creating preallocated view
Summary: This is expected with Suspense/CM enabled. We are measuring the perf impact of extra CREATE instructions atm, and will revert the change if it regresses too much. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D32558829 fbshipit-source-id: 2e0c91be3aba4ca632814739aed6b8964e21b5a8
1 parent 7658440 commit db21584

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import com.facebook.common.logging.FLog;
2020
import com.facebook.infer.annotation.Assertions;
2121
import com.facebook.infer.annotation.ThreadConfined;
22-
import com.facebook.react.bridge.ReactNoCrashSoftException;
2322
import com.facebook.react.bridge.ReactSoftExceptionLogger;
2423
import com.facebook.react.bridge.ReadableArray;
2524
import com.facebook.react.bridge.ReadableMap;
@@ -543,16 +542,12 @@ public void createView(
543542
}
544543
// We treat this as a perf problem and not a logical error. View Preallocation or unexpected
545544
// changes to Differ or C++ Binding could cause some redundant Create instructions.
546-
// This is a NoCrash soft exception because we know there are cases where preallocation happens
547-
// and a node is recreated: if a node is preallocated and then committed with revision 2+,
548-
// an extra CREATE instruction will be generated.
545+
// There are cases where preallocation happens and a node is recreated: if a node is
546+
// preallocated and then committed with revision 2+, an extra CREATE instruction will be
547+
// generated.
549548
// This represents a perf issue only, not a correctness issue. In the future we need to
550549
// refactor View preallocation to correct the currently incorrect assumptions.
551550
if (getNullableViewState(reactTag) != null) {
552-
ReactSoftExceptionLogger.logSoftException(
553-
TAG,
554-
new ReactNoCrashSoftException(
555-
"Cannot CREATE view with tag [" + reactTag + "], already exists."));
556551
return;
557552
}
558553

0 commit comments

Comments
 (0)