Skip to content

Commit

Permalink
Disable native source code fetching in jsinspector-modern targets (#4…
Browse files Browse the repository at this point in the history
…6132)

Summary:
Pull Request resolved: #46132

Temporaily disable the `nativeSourceCodeFetching` capability — which reverts this to the legacy handling in the Inspector Proxy.

This is because we've noticed performance issues when loading large bundle source maps, particularly on Android, with a nontrivial path to optimising this ([raising the frontend `IO.read` size](facebookexperimental/rn-chrome-devtools-frontend#97) further is leading to WebSocket disconnections on Android 😐).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D61543480

fbshipit-source-id: ee66b4cebd40f8cc6466270c5875df744d2b588a
  • Loading branch information
huntie authored and facebook-github-bot committed Aug 21, 2024
1 parent a462dfd commit 5164287
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/react-native/React/Base/RCTBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ - (void)setUp
}
return strongSelf->_inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true, .nativeSourceCodeFetching = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
}

Class bridgeClass = self.bridgeClass;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ ReactInstanceManagerInspectorTarget::ReactInstanceManagerInspectorTarget(
-> std::unique_ptr<ILocalConnection> {
return inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true,
.nativeSourceCodeFetching = true,
.prefersFuseboxFrontend = true});
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ JReactHostInspectorTarget::JReactHostInspectorTarget(
// Reject the connection.
return nullptr;
},
{.nativePageReloads = true,
.nativeSourceCodeFetching = true,
.prefersFuseboxFrontend = true});
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ - (void)start
}
return strongSelf->_inspectorTarget->connect(std::move(remote));
},
{.nativePageReloads = true, .nativeSourceCodeFetching = true, .prefersFuseboxFrontend = true});
{.nativePageReloads = true, .prefersFuseboxFrontend = true});
}
if (_instance) {
RCTLogWarn(
Expand Down

0 comments on commit 5164287

Please sign in to comment.