Hi,
I use spring ldap at work, I have this query that returns 15,000 objects.
With Spring LDAP, my search delay 00:06:37s
The same search, but using pure JNDI, my search delay only 00:00:39s (10 times faster than with spring ldap):Code:getLdap().search("user=ou,global=o", "cn=*", ONELEVEL_SCOPE, new ContextMapper() { public Object mapFromContext(Object ctx) { count++; // only count the result } });
The tests were performed on the same server.Code:SearchControls ctls = new SearchControls(); NamingEnumeration answer; // all attributes ctls.setReturningAttributes(userAttributes); ctls.setSearchScope(SearchControls.ONELEVEL_SCOPE); InitialLdapContext ctx = getConnection(); answer = ctx.search("user=ou,global=o", "cn=*", ctls); int total = 0; while ( answer.hasMore() ) { answer.nextElement(); total++; // only count the result also }
Not yet discovered the cause of the problem with the spring ldap, anyone have any idea of the cause???
thanks.



Reply With Quote
