mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
bb9a24d9fc
## Summary `fastAddProperties` has shown some perf benefits when used for creating props payload for new components. In this PR we'll try to use it for diffing props for existing components. It would be good enough if it simply doesn't regress perf. We'll be able to delete the old `addProperties`, and make `fastAddProperties` the default behaviour. ## How did you test this change? ``` yarn lint yarn flow native yarn test packages/react-native-renderer -r=xplat --variant=false yarn test packages/react-native-renderer -r=xplat --variant=true ```
32 lines
1.4 KiB
JavaScript
32 lines
1.4 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
*/
|
|
|
|
// In xplat, these flags are controlled by GKs. Because most GKs have some
|
|
// population running in either mode, we should run our tests that way, too,
|
|
//
|
|
// Use __VARIANT__ to simulate a GK. The tests will be run twice: once
|
|
// with the __VARIANT__ set to `true`, and once set to `false`.
|
|
//
|
|
// TODO: __VARIANT__ isn't supported for React Native flags yet. You can set the
|
|
// flag here but it won't be set to `true` in any of our test runs. Need to
|
|
// add a test configuration for React Native.
|
|
|
|
export const alwaysThrottleRetries = __VARIANT__;
|
|
export const enableObjectFiber = __VARIANT__;
|
|
export const enableHiddenSubtreeInsertionEffectCleanup = __VARIANT__;
|
|
export const enablePersistedModeClonedFlag = __VARIANT__;
|
|
export const enableShallowPropDiffing = __VARIANT__;
|
|
export const passChildrenWhenCloningPersistedNodes = __VARIANT__;
|
|
export const enableFabricCompleteRootInCommitPhase = __VARIANT__;
|
|
export const enableSiblingPrerendering = __VARIANT__;
|
|
export const enableUseResourceEffectHook = __VARIANT__;
|
|
export const enableOwnerStacks = __VARIANT__;
|
|
export const enableRemoveConsolePatches = __VARIANT__;
|
|
export const enableFastAddPropertiesInDiffing = __VARIANT__;
|