Hi all,
We are experiencing something pretty odd.
CentOS 5 python2.4.4 python-ldap 2.3.4
While polling it appears that we have to call result for every record that
is waiting to be read. Since we added a 250 millisecond delay between calls
larger queries are taking a really long time.
def searchForAsync(self, searchString):
id = self.connection.search('dc=my,dc=base,dc=rec',2,searchStr
ing,['*','+'])
result = [None, None]
count = 0
start = time.time()
while(result[0] == None):
count = count + 1
result = self.connection.result(id, True, 0)
time.sleep(0.25)
print "Total call count: " + str(count)
print "Total query time: " + str(time.time - start)
return result
The result: With 165 records the total call count is 167 and the total time
42.1 seconds.
Is this expected or did we do something wrong?
Thanks for your help!
Ron
|