From b0f1068e8ecaf234b1e1e0f5bf3a3b40bfb0fbf0 Mon Sep 17 00:00:00 2001 From: Aditya Sharat Date: Mon, 17 Jun 2024 15:19:36 -0700 Subject: [PATCH] Uses .equals for comparing treeprops Summary: Uses .equals for comparing treeprops in the component tree to check resolution can be skipped Reviewed By: astreet Differential Revision: D58685875 fbshipit-source-id: da4c5ff7267912d268a8a51cf9aa23f20a92bb22 --- .../src/main/java/com/facebook/litho/ComponentTree.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litho-core/src/main/java/com/facebook/litho/ComponentTree.java b/litho-core/src/main/java/com/facebook/litho/ComponentTree.java index c414c10aca..b20941c0d1 100644 --- a/litho-core/src/main/java/com/facebook/litho/ComponentTree.java +++ b/litho-core/src/main/java/com/facebook/litho/ComponentTree.java @@ -88,6 +88,7 @@ import com.facebook.rendercore.debug.DebugEventAttribute; import com.facebook.rendercore.debug.DebugEventBus; import com.facebook.rendercore.debug.DebugEventDispatcher; +import com.facebook.rendercore.utils.EquivalenceUtils; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.Collections; @@ -1923,7 +1924,8 @@ private void requestRenderWithSplitFutures( // layout. if (currentResolveResult != null) { boolean isSameTreeProps = - currentResolveResult.context.getTreePropContainer() == treePropContainer + EquivalenceUtils.equals( + currentResolveResult.context.getTreePropContainer(), treePropContainer) || (ComponentsConfiguration.defaultInstance.enableLifecycleOwnerWrapper && treePropContainer == null);