Skip to content

Commit

Permalink
Refactor and separate layout affected nodes react marker (#39249)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #39249

Changelog:
[Internal] - Code refactor on affected nodes in react marker.

Reviewed By: rshest

Differential Revision: D48884903

fbshipit-source-id: d09ec8ad398818589c4fdfa8d64bf8a7e5627e43
  • Loading branch information
Xin Chen authored and facebook-github-bot committed Sep 12, 2023
1 parent 0e5ea28 commit 5998320
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public enum ReactMarkerConstants {
FABRIC_DIFF_END,
FABRIC_LAYOUT_START,
FABRIC_LAYOUT_END,
FABRIC_LAYOUT_AFFECTED_NODES,
FABRIC_BATCH_EXECUTION_START,
FABRIC_BATCH_EXECUTION_END,
FABRIC_UPDATE_UI_MAIN_THREAD_START,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public long getLayoutEnd() {
}

public int getAffectedLayoutNodesCount() {
return getCounter(FABRIC_LAYOUT_END);
return getCounter(FABRIC_LAYOUT_AFFECTED_NODES);
}

public long getBatchExecutionStart() {
Expand Down Expand Up @@ -292,6 +292,7 @@ private static boolean isFabricCommitMarker(ReactMarkerConstants name) {
|| name == FABRIC_BATCH_EXECUTION_START
|| name == FABRIC_BATCH_EXECUTION_END
|| name == FABRIC_UPDATE_UI_MAIN_THREAD_START
|| name == FABRIC_UPDATE_UI_MAIN_THREAD_END;
|| name == FABRIC_UPDATE_UI_MAIN_THREAD_END
|| name == FABRIC_LAYOUT_AFFECTED_NODES;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,9 @@ public void runGuarded() {
ReactMarker.logFabricMarker(
ReactMarkerConstants.FABRIC_LAYOUT_START, null, commitNumber, layoutStartTime);
ReactMarker.logFabricMarker(
ReactMarkerConstants.FABRIC_LAYOUT_END,
ReactMarkerConstants.FABRIC_LAYOUT_END, null, commitNumber, layoutEndTime);
ReactMarker.logFabricMarker(
ReactMarkerConstants.FABRIC_LAYOUT_AFFECTED_NODES,
null,
commitNumber,
layoutEndTime,
Expand Down

0 comments on commit 5998320

Please sign in to comment.