defect

Jens Vagelpohl jens at zope.com
Thu Jun 27 13:45:34 CEST 2002


On Wednesday, June 26, 2002, at 04:58 , Michael Ströder wrote:
> It's possible to make it somewhat simpler since we have a first result() 
> call before the while loops.
>
>     while all:
>       while ldap_result[0] is None:
>         if (timeout>=0) and (time.time()-start_time>timeout):
>           self._ldap_call(self._l.abandon,msgid)
>           raise _ldap.TIMELIMIT_EXCEEDED(
>             "LDAP time limit (%d secs) exceeded." % (timeout)
>           )
>         time.sleep(0.0001)
>         ldap_result = self._ldap_call(self._l.result,msgid,0,0)
>       if ldap_result[1] is None:
>         break
>       all_results.extend(ldap_result[1])
>       ldap_result = None,None
>     return all_results
>

this simplified version seems to slow down my setup. all of a sudden i get 
only 50-70% of my previous speed. here is a result set with the result 
method changed to the format shown above::

*** Read the RootDSE on same connection
     50.432497 searches/second
*** Read the RootDSE on newly created connection without extra simple bind
     49.699850 searches/second
*** Read the RootDSE on newly created connection with an extra simple bind
     31.885130 searches/second


here's a result set with leif's version::

*** Read the RootDSE on same connection
    100.785835 searches/second
*** Read the RootDSE on newly created connection without extra simple bind
     95.549340 searches/second
*** Read the RootDSE on newly created connection with an extra simple bind
     49.825837 searches/second

jens








More information about the python-ldap mailing list