MantisBT: master-1.2.x e61e63ca

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2013-01-22 20:26 master-1.2.x ced463b1
Affected Issues  0015411: Huge memory consumption for print_user_option_list()
Changeset

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 0015411

mod - core/print_api.php Diff File