MantisBT: master-1.2.x cc7703ac

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2013-05-01 06:49 master-1.2.x c4f6493a
Affected Issues  0009876: Performance problem with a lot of projects
Changeset

Optimize user_get_all_accessible_projects()

On instances having a large number of projects, this function would
consume significant resources while processing all the subprojects to
determine if one is accessible to the user (about 25 seconds to load
main_page.php for 5'000 projects, without subprojects).

The performance bottleneck was the array_merge() call in the loop. This
has been replaced by a foreach working on an associative array. The same
page now loads under 1 second.

Fixes 0009876

mod - core/user_api.php Diff File