Skip to content

Commit

Permalink
Remove clearVisibilityItemsOnlyWhenDirty experiment
Browse files Browse the repository at this point in the history
Summary: This is the correct thing to do, we don't need to assess impact any more.

Reviewed By: marco-cova

Differential Revision: D9420682

fbshipit-source-id: 1cbfb1af80a2f5f95d794013960c39d0f41bc135
  • Loading branch information
IanChilds authored and facebook-github-bot committed Aug 21, 2018
1 parent b52eacc commit b4b7234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 3 additions & 5 deletions litho-core/src/main/java/com/facebook/litho/MountState.java
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,6 @@ private void processVisibilityOutputs(
final boolean isDoingPerfLog = mMountStats.isLoggingEnabled;
final boolean isTracing = ComponentsSystrace.isTracing();
final long totalStartTime = isDoingPerfLog ? System.nanoTime() : 0L;
final boolean clearRemovedVisibilityItems =
mIsDirty || !ComponentsConfiguration.clearVisibilityItemsOnlyWhenDirty;
for (int j = 0, size = layoutState.getVisibilityOutputCount(); j < size; j++) {
final VisibilityOutput visibilityOutput = layoutState.getVisibilityOutputAt(j);
if (isTracing) {
Expand Down Expand Up @@ -572,7 +570,7 @@ private void processVisibilityOutputs(
visibilityItem = null;
} else {
// Processed, do not clear.
visibilityItem.setDoNotClearInThisPass(clearRemovedVisibilityItems);
visibilityItem.setDoNotClearInThisPass(mIsDirty);
}
}

Expand All @@ -585,7 +583,7 @@ private void processVisibilityOutputs(
: null;
visibilityItem =
ComponentsPools.acquireVisibilityItem(globalKey, invisibleHandler, unfocusedHandler);
visibilityItem.setDoNotClearInThisPass(clearRemovedVisibilityItems);
visibilityItem.setDoNotClearInThisPass(mIsDirty);
mVisibilityIdToItemMap.put(visibilityOutputId, visibilityItem);

if (visibleHandler != null) {
Expand Down Expand Up @@ -634,7 +632,7 @@ private void processVisibilityOutputs(
}
}

if (clearRemovedVisibilityItems) {
if (mIsDirty) {
clearVisibilityItems();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ public class ComponentsConfiguration {

public static boolean useNewIsEquivalentTo = false;

/** Only clear visibility items in MountState when the MountState is dirty */
public static boolean clearVisibilityItemsOnlyWhenDirty = true;

/** Assess the impact of using the Thrawable class to track crashes across threads */
/** Assess the impact of using the Throwable class to track crashes across threads */
public static boolean enableThrowableTracking = false;

/** Whether we should do incremental mount on pre draw */
Expand Down

0 comments on commit b4b7234

Please sign in to comment.