Coming from here
Background:
UserSelectPopup handles large datasets of personal details and reports. The getValidOptions() function performs costly filtering and cross-referencing on every interaction. Users with heavy accounts need to select multiple people from huge contact lists containing hundreds or thousands of entries. The current implementation processes selection state checks for every item in the list against every selected item.
Problem:
When users select people in UserSelectPopup with large contact lists, in the component are delays and UI lags, which prevents users from efficiently completing their selection tasks.
Solution:
Replace selectedOptions.some() with Set-based O(1) lookups
- Memoize initial selectedOptions computation
- Refactor selectUser with filter() for cleaner, more efficient logic
- With the change we were able to reduce the render time by 200ms and reduce renders by 1
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021947959328313625345
- Upwork Job ID: 1947959328313625345
- Last Price Increase: 2025-07-23
Issue Owner
Current Issue Owner: @rinej
Coming from here
Background:
UserSelectPopup handles large datasets of personal details and reports. The getValidOptions() function performs costly filtering and cross-referencing on every interaction. Users with heavy accounts need to select multiple people from huge contact lists containing hundreds or thousands of entries. The current implementation processes selection state checks for every item in the list against every selected item.
Problem:
When users select people in UserSelectPopup with large contact lists, in the component are delays and UI lags, which prevents users from efficiently completing their selection tasks.
Solution:
Replace selectedOptions.some() with Set-based O(1) lookups
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rinej