MantisBT: master-2.23 709fb78e

Author Committer Branch Timestamp Parent
dregad dregad master-2.23 2020-01-23 06:32 master-2.23 461faac7
Affected Issues  0026600: Performance loss after update from 2.20.0 to 2.23.0
 0026622: LDAP API does not cache realname information
Changeset

Reduce number of LDAP searches

Prior to this, retrieving user information required 1 LDAP search each
time a user was referenced on a page (possibly 2 if Mantis is configured
to show the realname). This could have a significant performance impact
when displaying pages containing a large number of users (e.g. viewing
an Issue having a long history, as described in issue 0026600).

Implement a new ldap_cache_user_data() function to retrieve all needed
LDAP attributes in a single search, and cache them.

This way, we only need to query the LDAP server once per user,
subsequent calls only need to access the cache which drastically
improves performance.

Fixes 0026622, 0026600

mod - core/ldap_api.php Diff File