Skip to content

RFE: improve the performance of evaluation of filter component when tested against a large valueset (like group members) #6172

Closed
@tbordaz

Description

@tbordaz

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:

  1. Create 10000 groups and 10000 users (with a user 'foo')
  2. Make all groups containing all users.
  3. do search with filter "(&(objectclass=groupofuniquenames)(uniqueMember=foo))"
  4. response time is long because of cache priming
  5. 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.

Metadata

Metadata

Assignees

Labels

performanceIssue impacts performancepriority_highneed urgent fix / highly valuable / easy to fixwork in progressWork in Progress - can be reviewed, but not ready for merge.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions