Skip to content

Commit

Permalink
Disable shadow tree introspection by default (#43578)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #43578

Changelog: [internal]

We have a feature to do some validation of the mount operations when committing new trees in Fabric. That's very slow but it was ok before because we were only doing this in debug mode and in the JS thread. We're moving some of this work to the UI thread instead and we're seeing an impact on scroll performance.

This disables this feature by default but leaves it in code to enable it when necessary for debugging.

Reviewed By: NickGerleman, sammy-SC

Differential Revision: D55138795

fbshipit-source-id: 45ca47ae2562cecb070691bf33d95c9108a9eca3
  • Loading branch information
rubennorte authored and facebook-github-bot committed Mar 25, 2024
1 parent f446cf6 commit 8a2cf68
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,11 @@
// Enables some Shadow Tree introspection features (maintains a StubViewTree,
// and logs prev/next tree and mutations if there are any discrepancies). If you
// define this, also define `RN_DEBUG_STRING_CONVERTIBLE`.
#if (defined(REACT_NATIVE_DEBUG) && defined(WITH_FBSYSTRACE))
#define RN_SHADOW_TREE_INTROSPECTION 1
#endif
// #define RN_SHADOW_TREE_INTROSPECTION 1

// This enables certain object-to-string debug conversions to be compiled.
// Enable if `RN_SHADOW_TREE_INTROSPECTION` is enabled.
#ifdef RN_SHADOW_TREE_INTROSPECTION
// Enable if `REACT_NATIVE_DEBUG` is enabled.
#ifdef REACT_NATIVE_DEBUG
#define RN_DEBUG_STRING_CONVERTIBLE 1
#else
#define RN_DEBUG_STRING_CONVERTIBLE 0
Expand Down

0 comments on commit 8a2cf68

Please sign in to comment.