Fix description:
memberof.c: replaced DN strings with Slapi_DN and set the
normalized info to Slapi_Value flags. It reduces the number
of slaip_dn_normalize_ext call by ~25%.
attr.c, slapi-plugin.h: introduced a new API slapi_attr_
value_cmp_ext which takes Slapi_Value instead of struct
berval. By replacing with Slapi_Value, the value flag
(e.g., normalized info) can be passed to the syntax plugin.
Replying to nkinder:
Unfortunately, there was no observable performance gain. Let me explain it with the test env next...What sort of performance increase do these changes give you in your testing?
Note: With/Without? the attached patch:
0001-Trac-Ticket-412-memberof-performance-enhancement.patch,
there was no difference in the elapsed time.
This test adds 1000 user entries first (ldapmodify...).
Then memof_script.sh adds a group entry which contains the 1000
members; the script waits for all the user entries have memberof
attribute value.
(The test files are attached to the trac #412 with the
instructions.)
Straight ldapmodify ...; sh memof_script.sh: 14 seconds
ldapmodify ...; restart the server; sh memof_script.sh: 27
seconds
ldapmodify ...; restart the server; ldapsearch <all>; sh
memof_script.sh: 27 seconds
(I.e, the difference is not due to the entries in the entry
cache or not)