Skip to content

Commit

Permalink
Create MC to verify impact of eager initialization of fabric classes
Browse files Browse the repository at this point in the history
Summary:
This diff creates a MC to verify impact of eager initialization of fabric classes, the purpose is to remove this code, but before doing that I would like to verify what's the impact.

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D28223943

fbshipit-source-id: 6f7c4701fb730fe1c0629ec13ead592ff619373f
  • Loading branch information
mdvacca authored and facebook-github-bot committed May 5, 2021
1 parent c6b8625 commit 7fe6bc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public class ReactFeatureFlags {
/** Feature flag to configure eager initialization of Fabric */
public static boolean eagerInitializeFabric = false;

/** Feature flag to configure eager initialization classes of Fabric */
public static boolean eagerInitializeFabricClasses = false;

/** Enables Static ViewConfig in RN Android native code. */
public static boolean enableExperimentalStaticViewConfigs = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.UIManager;
import com.facebook.react.bridge.queue.MessageQueueThread;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.fabric.events.EventBeatManager;
import com.facebook.react.fabric.events.EventEmitterWrapper;
import com.facebook.react.fabric.events.FabricEventEmitter;
Expand Down Expand Up @@ -63,7 +64,9 @@ public UIManager get() {
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE, "FabricJSIModuleProvider.registerBinding");
final Binding binding = new Binding();
// TODO T31905686: remove this call
loadClasses();
if (ReactFeatureFlags.eagerInitializeFabricClasses) {
loadClasses();
}
MessageQueueThread jsMessageQueueThread =
mReactApplicationContext
.getCatalystInstance()
Expand Down

0 comments on commit 7fe6bc1

Please sign in to comment.