Skip to content

Commit

Permalink
Disable native source code fetching in jsinspector-modern targets
Browse files Browse the repository at this point in the history
Summary:
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]

Differential Revision: D61543480
  • Loading branch information
huntie authored and facebook-github-bot committed Aug 21, 2024
1 parent 8f0f50f commit f897f91
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 f897f91

Please sign in to comment.