python loop performance

mahdieh saeed maheh_saied at yahoo.com
Thu Apr 26 01:58:14 EDT 2007


I use python and berkeley db for my application.(use bsddb3)
Use freebsd operating system.

My question is about loop that I use for my application.I use loop like this for fetch information.

info=cur.get(key,DB_SET)
while info:
    info=cur.next()

If this loop fetch 10000 records taking alot of time .(about 6 seconds).
I use this loop with out any operation .Does any one have idea  for imporove performance.

regrards,
saeed


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070425/97d165a4/attachment.html>


More information about the Python-list mailing list