Skip to content

[Due for payment 2026-05-12] [$250] Fix freeze when opening "Add approval workflow" on workspaces with many members #89270

Description

@MelvinBot

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 OwnerCurrent Issue Owner: @mallenexpensify

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions