diff --git a/litho-core/src/main/java/com/facebook/litho/config/ComponentsConfiguration.kt b/litho-core/src/main/java/com/facebook/litho/config/ComponentsConfiguration.kt index 11ef591c430..89612e94937 100644 --- a/litho-core/src/main/java/com/facebook/litho/config/ComponentsConfiguration.kt +++ b/litho-core/src/main/java/com/facebook/litho/config/ComponentsConfiguration.kt @@ -48,7 +48,6 @@ internal constructor( val shouldAddHostViewForRootComponent: Boolean = false, @JvmField val useIncrementalMountGapWorker: Boolean = IncrementalMountExtensionConfigs.useGapWorker, - @JvmField val nestedPreallocationEnabled: Boolean = false, val useNonRebindingEventHandlers: Boolean = false, internal val shouldDisableBgFgOutputs: Boolean = false, /** @@ -228,7 +227,6 @@ internal constructor( class Builder internal constructor(private var baseConfig: ComponentsConfiguration) { private var shouldAddHostViewForRootComponent = baseConfig.shouldAddHostViewForRootComponent - private var nestedPreallocationEnabled = baseConfig.nestedPreallocationEnabled private var specsApiStateUpdateDuplicateDetectionEnabled = baseConfig.specsApiStateUpdateDuplicateDetectionEnabled private var shouldCacheLayouts = baseConfig.shouldCacheLayouts @@ -244,8 +242,6 @@ internal constructor( shouldAddHostViewForRootComponent = enabled } - fun nestedPreallocationEnabled(enabled: Boolean) = also { nestedPreallocationEnabled = enabled } - fun shouldCacheLayouts(enabled: Boolean) = also { shouldCacheLayouts = enabled } fun specsApiStateUpdateDetectionEnabled(enabled: Boolean) = also { @@ -282,7 +278,6 @@ internal constructor( return baseConfig.copy( specsApiStateUpdateDuplicateDetectionEnabled = specsApiStateUpdateDuplicateDetectionEnabled, - nestedPreallocationEnabled = nestedPreallocationEnabled, shouldCacheLayouts = shouldCacheLayouts, shouldAddHostViewForRootComponent = shouldAddHostViewForRootComponent, isReconciliationEnabled = isReconciliationEnabled, diff --git a/litho-it/src/test/java/com/facebook/litho/NestedPreallocationTest.kt b/litho-it/src/test/java/com/facebook/litho/NestedPreallocationTest.kt index 7e4627cf303..5bff59c4dab 100644 --- a/litho-it/src/test/java/com/facebook/litho/NestedPreallocationTest.kt +++ b/litho-it/src/test/java/com/facebook/litho/NestedPreallocationTest.kt @@ -77,7 +77,6 @@ class NestedPreallocationTest { ComponentTree.create(context, EmptyComponent()) .componentsConfiguration( ComponentsConfiguration.defaultInstance.copy( - nestedPreallocationEnabled = true, mountContentPreallocationEnabled = preallocationEnabled)) .build() diff --git a/litho-widget/src/main/java/com/facebook/litho/widget/RecyclerBinder.java b/litho-widget/src/main/java/com/facebook/litho/widget/RecyclerBinder.java index 04641b53216..0ea0d7b334d 100644 --- a/litho-widget/src/main/java/com/facebook/litho/widget/RecyclerBinder.java +++ b/litho-widget/src/main/java/com/facebook/litho/widget/RecyclerBinder.java @@ -751,18 +751,12 @@ private RecyclerBinder(Builder builder) { tempConfiguration = ComponentsConfiguration.create(tempConfiguration) /* - Incremental mount will not work if this ComponentTree is nested in a parent with it turned off, + Incremental mount will not work if this ComponentTree is nested in a parent with it turned off, so always disable it in that case */ .incrementalMountEnabled( ComponentContext.isIncrementalMountEnabled(mComponentContext) && tempConfiguration.incrementalMountEnabled) - /* - If nested preallocation is disabled, we forcefully disable mount content preallocation. - */ - .mountContentPreallocationEnabled( - tempConfiguration.nestedPreallocationEnabled - && tempConfiguration.mountContentPreallocationEnabled) .build(); mComponentsConfiguration = tempConfiguration;