Skip to content

Commit 6327c00

Browse files
Fabio Carballofacebook-github-bot
Fabio Carballo
authored andcommitted
Remove configuration for threadPooolConfiguration
Summary: This config is not being override anywhere and we aren't looking to provide any global config. We can remove it. Reviewed By: adityasharat Differential Revision: D51586372 fbshipit-source-id: 6b599c4dc69ac3cbdfc86af19792d02ccc20dac8
1 parent afd3fb0 commit 6327c00

File tree

3 files changed

+9
-20
lines changed

3 files changed

+9
-20
lines changed

litho-core/src/main/java/com/facebook/litho/config/ComponentsConfiguration.kt

-4
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ internal constructor(
140140
*/
141141
@JvmField var forceEnableTransitionsForInstrumentationTests: Boolean = false
142142

143-
/**
144-
* If non-null, a thread pool will be used for async layouts instead of a single layout thread.
145-
*/
146-
@JvmField var threadPoolConfiguration: LayoutThreadPoolConfiguration? = null
147143
@JvmField var enableThreadTracingStacktrace: Boolean = false
148144

149145
/** Sets if is reconciliation is enabled */

litho-sections-widget/src/main/java/com/facebook/litho/sections/widget/RecyclerBinderConfiguration.java

+9-13
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public class RecyclerBinderConfiguration {
5050
private final boolean mEnableItemPrefetch;
5151
private final int mItemViewCacheSize;
5252
private final boolean mRequestMountForPrefetchedItems;
53-
private LayoutThreadPoolConfiguration mThreadPoolConfiguration =
54-
ComponentsConfiguration.threadPoolConfiguration;
53+
54+
@Nullable private final LayoutThreadPoolConfiguration mThreadPoolConfiguration;
5555
@Nullable private RunnableHandler mChangeSetThreadHandler;
5656
private final boolean mIsReconciliationEnabled;
5757
private final boolean mIsIncrementalMountEnabled;
@@ -213,13 +213,11 @@ public int getEstimatedViewportCount() {
213213
}
214214

215215
public static class Builder {
216-
public static final LayoutThreadPoolConfiguration DEFAULT_THREAD_POOL_CONFIG =
217-
ComponentsConfiguration.threadPoolConfiguration;
218216
static final float DEFAULT_RANGE = RecyclerBinder.Builder.DEFAULT_RANGE_RATIO;
219217
public static final int UNSET = -1;
220218

221219
@Nullable private LayoutHandlerFactory mLayoutHandlerFactory;
222-
private LayoutThreadPoolConfiguration mThreadPoolConfiguration = DEFAULT_THREAD_POOL_CONFIG;
220+
private @Nullable LayoutThreadPoolConfiguration mThreadPoolConfiguration;
223221
private @Nullable ComponentsConfiguration mComponentsConfiguration;
224222
private float mRangeRatio = DEFAULT_RANGE;
225223
private boolean mCircular = false;
@@ -282,14 +280,12 @@ public Builder idleExecutor(@Nullable LayoutHandlerFactory idleExecutor) {
282280
return this;
283281
}
284282

285-
/** Null value will fall back to the non-null default one. */
286-
public Builder threadPoolConfiguration(
287-
@Nullable LayoutThreadPoolConfiguration threadPoolConfiguration) {
288-
if (threadPoolConfiguration != null) {
289-
mThreadPoolConfiguration = threadPoolConfiguration;
290-
} else {
291-
mThreadPoolConfiguration = DEFAULT_THREAD_POOL_CONFIG;
292-
}
283+
/**
284+
* Set the {@link LayoutThreadPoolConfiguration} to use in the {@link
285+
* RecyclerBinderConfiguration}
286+
*/
287+
public Builder threadPoolConfiguration(LayoutThreadPoolConfiguration threadPoolConfiguration) {
288+
mThreadPoolConfiguration = threadPoolConfiguration;
293289
return this;
294290
}
295291

litho-widget/src/main/java/com/facebook/litho/widget/RecyclerBinder.java

-3
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,6 @@ private RecyclerBinder(Builder builder) {
973973
if (builder.threadPoolConfig != null) {
974974
mThreadPoolConfig = builder.threadPoolConfig;
975975
mLayoutThreadPoolHandler = ThreadPoolLayoutHandler.getNewInstance(mThreadPoolConfig);
976-
} else if (ComponentsConfiguration.threadPoolConfiguration != null) {
977-
mThreadPoolConfig = ComponentsConfiguration.threadPoolConfiguration;
978-
mLayoutThreadPoolHandler = ThreadPoolLayoutHandler.getNewInstance(mThreadPoolConfig);
979976
} else {
980977
mThreadPoolConfig = null;
981978
mLayoutThreadPoolHandler = null;

0 commit comments

Comments
 (0)