[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapsearch.c, ldap_get_attribute_ber



I note that the alternate version of print_entry() using the ldap_*ber APIs
gives a substantial speedup for ldapsearch on large searches. The runtime for
ldapsearch querying a local server with the new API is only about 10% slower
than running slapcat. It might be worthwhile to make the new code the default
(in HEAD, at least), document the new functions, and start encouraging their
use over the old API.

On my Linux test box, searching a 14MB 10,000 entry database with the old
ldapsearch takes about 5.5 seconds, slapcat takes 1.7 seconds, and the new
ldapsearch takes 1.9 seconds.

On a Solaris machine with a 1GB 280,000 entry database the old ldapsearch
takes 13 minutes, slapcat takes 2:25, and the new ldapsearch takes 2:41.

Even in these varying test conditions, the difference in performance is
consistent and dramatic.

I suppose it's not too realistic to run ldapsearch to dump the entire
database on a frequent basis, but it's nice to know that you can do it
without too much cost.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support