This issue tracks the fix for a performance freeze when opening "Add approval workflow" on workspaces with many members.
Problem: getMemberAccountIDsForWorkspace(policy?.employeeList) was being called inside two separate .map() callbacks, creating O(N²) work. On workspaces with a few hundred members, pressing "Add approval workflow" froze the app for roughly a minute.
Fix PR: #89268
The fix hoists the call to the component body so it runs once per render instead of once per member.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022049848884144386257
- Upwork Job ID: 2049848884144386257
- Last Price Increase: 2026-04-30
Issue Owner
Current Issue Owner: @mallenexpensify
This issue tracks the fix for a performance freeze when opening "Add approval workflow" on workspaces with many members.
Problem:
getMemberAccountIDsForWorkspace(policy?.employeeList)was being called inside two separate.map()callbacks, creating O(N²) work. On workspaces with a few hundred members, pressing "Add approval workflow" froze the app for roughly a minute.Fix PR: #89268
The fix hoists the call to the component body so it runs once per render instead of once per member.
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify