Description
Is your feature request related to a problem? Please describe.
Before returning an entry (to a SRCH) the server check that the SRCH filter matches the entry. If a component of the filter is testing a large valueset in the candidate entry, it is expensive to check the matching.
A typical issue is with a component like '(uniquemember=foo)' and the candidate entry is a group containing thousands of 'uniquemember'.
Steps to reproduce the behavior:
- Create 10000 groups and 10000 users (with a user 'foo')
- Make all groups containing all users.
- do search with filter "(&(objectclass=groupofuniquenames)(uniqueMember=foo))"
- response time is long because of cache priming
- do search with filter "(&(objectclass=groupofuniquenames)(uniqueMember=foo))" is better but still slow
Once primed the second search should be much faster
Describe the solution you'd like
Proposed an option to use the sorted valueset when checking the match (ava test)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
I initially thought that the performance issue was related to a filter bypass (on indexed searches) #6030 but I doubt that the bypass is always possible. So I prefer to make the test of the match faster.