Le 2/22/13 8:59 AM, Ludovic Poitou a écrit : > Hi Emmanuel, Hi Ludovic > > You might want to eval the scope after the filter rather than initially. > In most real life deployments, applications are searching for a single user, > like (uid=elecharny), as a subtree through the whole directory. The scope > becomes irrelevant then. It will be disacarded as we will have only one candidate (or a few) that match the uid filter, understood. > So checking the scope first adds processing of no value. For us, it's just a matter of pulling a number from an index, which is just a call to a method accessing the Rdn index to fetch the base oject, but again, it will contain the number of direct children and the number of descendants, so it's fast (especially if it's in cache).
Now, if a filter like (cn=elecharny returns 0 or 1, we can avoid such a call, that's for sure. So I will apply the suggestion, and add the scope *only* if the number is below a certain threshold (5, 10 whatever). Very good suggestion ! Brillant ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
