Skip to content

Commit

Permalink
Merge pull request Expensify#46807 from margelo/chore/add-perf-events…
Browse files Browse the repository at this point in the history
…-for-filter-options

chore: add timing collection for `filterOptions`
  • Loading branch information
roryabraham authored Aug 5, 2024
2 parents 8766242 + b01efbe commit 2b9cd06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ const CONST = {
SEARCH_OPTION_LIST_DEBOUNCE_TIME: 300,
RESIZE_DEBOUNCE_TIME: 100,
UNREAD_UPDATE_DEBOUNCE_TIME: 300,
SEARCH_FILTER_OPTIONS: 'search_filter_options',
},
PRIORITY_MODE: {
GSD: 'gsd',
Expand Down
3 changes: 3 additions & 0 deletions src/pages/ChatFinderPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ function ChatFinderPage({betas, isSearchingForReports, navigation}: ChatFinderPa
};
}

Timing.start(CONST.TIMING.SEARCH_FILTER_OPTIONS);
const newOptions = OptionsListUtils.filterOptions(searchOptions, debouncedSearchValue, {sortByReportTypeInSearch: true, betas, preferChatroomsOverThreads: true});
Timing.end(CONST.TIMING.SEARCH_FILTER_OPTIONS);

const header = OptionsListUtils.getHeaderMessage(newOptions.recentReports.length + Number(!!newOptions.userToInvite) > 0, false, debouncedSearchValue);
return {
recentReports: newOptions.recentReports,
Expand Down

0 comments on commit 2b9cd06

Please sign in to comment.