|
From: Jens V. <je...@zo...> - 2002-06-27 11:45:39
|
On Wednesday, June 26, 2002, at 04:58 , Michael Str=F6der wrote:
> It's possible to make it somewhat simpler since we have a first =
result()=20
> call before the while loops.
>
> while all:
> while ldap_result[0] is None:
> if (timeout>=3D0) 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 =3D self._ldap_call(self._l.result,msgid,0,0)
> if ldap_result[1] is None:
> break
> all_results.extend(ldap_result[1])
> ldap_result =3D None,None
> return all_results
>
this simplified version seems to slow down my setup. all of a sudden i =
get=20
only 50-70% of my previous speed. here is a result set with the result=20=
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
|