Skip to content

Commit

Permalink
add marker for heavy getOptions function
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Jan 3, 2024
1 parent 66a3f41 commit 4ba9352
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libs/OptionsListUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import * as ReportUtils from './ReportUtils';
import * as TaskUtils from './TaskUtils';
import * as TransactionUtils from './TransactionUtils';
import * as UserUtils from './UserUtils';
import Performance from './Performance';

/**
* OptionsListUtils is used to build a list options passed to the OptionsList component. Several different UI views can
Expand Down Expand Up @@ -1094,6 +1095,7 @@ function getOptions(
includeSelectedOptions = false,
},
) {
Performance.markStart('GetOptions');
if (includeCategories) {
const categoryOptions = getCategoryListSections(categories, recentlyUsedCategories, selectedOptions, searchInputValue, maxRecentReportsToShow);

Expand Down Expand Up @@ -1391,7 +1393,7 @@ function getOptions(
['asc'],
);
}

Performance.markEnd('GetOptions');
return {
personalDetails: personalDetailsOptions,
recentReports: recentReportOptions,
Expand Down

0 comments on commit 4ba9352

Please sign in to comment.