diff --git a/change/react-native-windows-6c292982-f272-4f1b-b3aa-f1ea284865d0.json b/change/react-native-windows-6c292982-f272-4f1b-b3aa-f1ea284865d0.json new file mode 100644 index 00000000000..c99b3d96dfc --- /dev/null +++ b/change/react-native-windows-6c292982-f272-4f1b-b3aa-f1ea284865d0.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "perf: simulate Text regression for demo (Sleep in ParagraphComponentView::updateProps)", + "packageName": "react-native-windows", + "email": "74712637+iamAbhi-916@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp index 8e66ee724bd..04b8caf677a 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp @@ -73,6 +73,9 @@ void ParagraphComponentView::UnmountChildComponentView( void ParagraphComponentView::updateProps( facebook::react::Props::Shared const &props, facebook::react::Props::Shared const &oldProps) noexcept { + // Simulated regression: adds ~3ms per Text mount for perf gate demo + Sleep(3); + const auto &oldViewProps = *std::static_pointer_cast(oldProps ? oldProps : viewProps()); const auto &newViewProps = *std::static_pointer_cast(props);