Skip to content

Commit

Permalink
Do not rebind if setting the same component tree
Browse files Browse the repository at this point in the history
Summary: Do not rebind if setting the same component tree

Reviewed By: zielinskimz

Differential Revision: D49053899

fbshipit-source-id: f119f0b2dad7cd730112c05b4719457d7d229fa3
  • Loading branch information
adityasharat authored and facebook-github-bot committed Sep 20, 2023
1 parent 5a8f7c1 commit 7238bda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion litho-core/src/main/java/com/facebook/litho/LithoView.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public void setComponentTree(

mTemporaryDetachedComponentTree = null;
if (mComponentTree == componentTree) {
if (isAttached()) {
if (ComponentsConfiguration.bindOnSameComponentTree && isAttached()) {
rebind();
}
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ public static boolean shouldUseLruCacheForUseCached() {
private static boolean sReduceMemorySpikeDataDiffSection = false;
private static boolean sReduceMemorySpikeGetUri = false;

public static boolean bindOnSameComponentTree = true;

public static void setReduceMemorySpikeUserSession() {
sReduceMemorySpikeUserSession = true;
}
Expand Down

0 comments on commit 7238bda

Please sign in to comment.