MantisBT: master-2.26 5ff35d16

Author Committer Branch Timestamp Parent
aaribaud-fgs dregad master-2.26 2024-08-02 07:40 master-2.26 60cdb374
Affected Issues  0034526: Bad performance when editing a project having a lot of subprojects
Changeset

Fix project_hierarchy_cache()

Currently, project_hierarchy_cache() caches either all projects or
enabled project only, whichever was requested last.

Project edit page calls project_hierarchy_cache() for each subproject
in turn, once for the whole hierarchy, and once for the enabled projects
hierarchy. This causes a cache reload on each call, defeating its
purpose.

The code now caches both hierarchies independently, so that alternating
calls will not cause cache reloads anymore.

Fixes 0034526, PR https://github.com/mantisbt/mantisbt/pull/2020

Signed-off-by: Damien Regad dregad@mantisbt.org

Original commit message edited, fixed incorrect Issue reference.

mod - core/project_hierarchy_api.php Diff File