• Post Reply Bookmark Topic Watch Topic
  • New Topic

LDAP result iteration performance problem.

 
Vicki Amin
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Ranchers,

I am running the below code to retrieve some results from an LDAP server and iterate through them. The problem is that the LDAP query itself takes just 0.25 seconds but the iteration is taking around 9 seconds. Any clue as to what I might be doing wrong over here?



Regards,
Vicki.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many elements does it iterate. It may be that although the initial query returns quickly each time you iterate the data it has to do a roundtrip to the source. If so, you may be able to set a buffer size or some other connection parameter that can reduce the roundtrips.
 
Vicki Amin
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve,

Thanks for the prompt reply. That actually makes a lot of sense. Would you know of any connection param's that I can use to reduce the round trips? One more question; would doing a simple also involve a round trip to the server?

Regards,
Vicki.
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would look at the LDAP api you are using. I'm not familiar with it. In jdbc you can set such parameters on connection. Look at the initial context to see if you can pass it parameters on creation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!