-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev: measure app start TTI more accurately #13997
Changes from all commits
43141e6
751d9e9
0260665
37a1586
51bebea
20b2634
d87f20b
ced132c
b333e1c
5017065
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ class ReportActionsView extends React.Component { | |
this.didLayout = false; | ||
this.didSubscribeToReportTypingEvents = false; | ||
this.unsubscribeVisibilityListener = null; | ||
this.hasCachedActions = _.size(props.reportActions) > 0; | ||
|
||
// We need this.sortedAndFilteredReportActions to be set before this.state is initialized because the function to calculate the newMarkerReportActionID uses the sorted report actions | ||
this.sortedAndFilteredReportActions = this.getSortedReportActionsForDisplay(props.reportActions); | ||
|
@@ -348,7 +349,7 @@ class ReportActionsView extends React.Component { | |
} | ||
|
||
this.didLayout = true; | ||
Timing.end(CONST.TIMING.SWITCH_REPORT, CONST.TIMING.COLD); | ||
Timing.end(CONST.TIMING.SWITCH_REPORT, this.hasCachedActions ? CONST.Timing.WARM : CONST.TIMING.COLD); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aimane-chnaif Thanks for this comment, I was coming here for the same as I have reported here too. |
||
|
||
// Capture the init measurement only once not per each chat switch as the value gets overwritten | ||
if (!ReportActionsView.initMeasured) { | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -61,6 +61,9 @@ const propTypes = { | |||||||||||||||||||||||
/** Current reportID from the route in react navigation state object */ | ||||||||||||||||||||||||
reportIDFromRoute: PropTypes.string, | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
/** Callback when onLayout of sidebar is called */ | ||||||||||||||||||||||||
onLayout: PropTypes.func, | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
/** Whether we are viewing below the responsive breakpoint */ | ||||||||||||||||||||||||
isSmallScreenWidth: PropTypes.bool.isRequired, | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
@@ -78,6 +81,7 @@ const defaultProps = { | |||||||||||||||||||||||
avatar: ReportUtils.getDefaultAvatar(), | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
reportIDFromRoute: '', | ||||||||||||||||||||||||
onLayout: () => {}, | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah sorry, I see you added here. |
||||||||||||||||||||||||
priorityMode: CONST.PRIORITY_MODE.DEFAULT, | ||||||||||||||||||||||||
}; | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
@@ -189,6 +193,7 @@ class SidebarLinks extends React.Component { | |||||||||||||||||||||||
shouldDisableFocusOptions={this.props.isSmallScreenWidth} | ||||||||||||||||||||||||
optionMode={this.props.priorityMode === CONST.PRIORITY_MODE.GSD ? 'compact' : 'default'} | ||||||||||||||||||||||||
onLayout={() => { | ||||||||||||||||||||||||
this.props.onLayout(); | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will fail unit testing. Let's add App/tests/utils/LHNTestUtils.js Lines 149 to 159 in 142fbba
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why it will fail unit testing? I set for |
||||||||||||||||||||||||
App.setSidebarLoaded(); | ||||||||||||||||||||||||
this.isSidebarLoaded = true; | ||||||||||||||||||||||||
}} | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this inside a promise caused #33290