-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 5.5
-
Fix Version/s: QualifiedToSchedule
-
Component/s: Security / Rights
-
Tags:
It would be nice to have some kind of cache on computed groups, especially when searching for a group in the user/group suggestion widget in the rights management tab.
Indeed, in this case, the following stack is called:
UserSuggestionActionsBean#getGroupsSuggestions(Object input) ... AbstractGroupComputer#hasGroup(String name) GroupComputer#getAllGroupIds()
In the AbstractAttributeBasedGroupComputer#getAllGroupIds() implementation, we have this loop:
for (String userId : getUM().getUserIds()) { ... }
with getUM().getUserIds() retrieving all users from the user directory!
When using an LDAP directory with thousands of entries we obviously get several occurrences of SizeLimitExceededException and the group search can take a very long time.
So it could be interesting to be able to cache the computed groups (with a good invalidation mechanism, sine the purpose of computed groups is to be dynamically computed...), or maybe find a way not to fetch all the group members when searching for such groups.