|
From: <mi...@st...> - 2002-06-28 07:09:55
|
Jens Vagelpohl wrote: >=20 > On Wednesday, June 26, 2002, at 04:58 , Michael Str=F6der wrote: >=20 >> It's possible to make it somewhat simpler since we have a first=20 >> result() call before the while loops. >> >> while all: >=20 > this simplified version seems to slow down my setup. Yes. I wrote that when posting the code snippet. > here's a result set with leif's version:: Leif's version sets non-zero timeout. Therefore it's faster since=20 OpenLDAP's ldap_result() can use select() to determine=20 just-in-time when data is ready to be read. But it blocks which is=20 a bad thing because of ldap._ldap_lock serializing *all* calls... Just adding the time.sleep() hands over the CPU to the OS. Off=20 course the while-loop is not just-in-time there if received data=20 is ready. Again, the problem is that the OpenLDAP libs are not thread-safe... Ciao, Michael. |