Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix huge memory consumption for print_user_option_list()
Following the implementation of the fix for 0010130, calling this function when the current project is ALL_PROJECTS causes a massive surge in memory usage as the code builds a large array containing the list of all users in all projects accessible to the current user, and then reduces it to remove duplicates. This commit reduces the problem by removing calls to array_merge() and building the consolidated user list in a single pass, using a while loop. No-longer-used arrays are unset to free up memory. Fixes #15411
- Loading branch information