react-native-macos/ReactCommon/fabric/core/tests
Valentin Shergin 6f97733bb8 Fabric: Changing `ComponentName` type alias from `std::string` to `char *`
Summary:
ComponentName is used by many core component of React Native, such as ComponentDescriptor, ShadowNode, ShadowView and so on. In all those cases this value represents the actual name of the component which came from `concreteComponentName` template parameter of ConcreteShadowNode. In all of those cases, it's raw `char const *` type. So, we don't need to use owning representation of the string (std::string) in all those places.

The only exception from this is a part where we receive the name of the component from JS side. In this case, the source string comes from JS and has to be analyzed as a character sequence to find corresponding ComponentDescriptor.

In my experiments, 20% of the time during diffing is spent on copying (this) `std::string`.

Reviewed By: mdvacca

Differential Revision: D15844407

fbshipit-source-id: a2e71505e22d09107e001bdf661d4a826bcf2dea
2019-06-18 11:31:20 -07:00
..
benchmarks Fabric: Synthetic benchmarks for prop parsing infra 2019-06-04 15:34:34 -07:00
ComponentDescriptorTest.cpp Fabric: Changing `ComponentName` type alias from `std::string` to `char *` 2019-06-18 11:31:20 -07:00
PrimitivesTest.cpp Fabric: Codemod: All `<fabric/...` includes were renamed to `<react/...` 2018-11-10 14:22:15 -08:00
ShadowNodeTest.cpp Fabric: Changing `ComponentName` type alias from `std::string` to `char *` 2019-06-18 11:31:20 -07:00
TestComponent.h Fabric: Rethinking of prop parsing infra 2019-06-12 21:35:21 -07:00