I have a few python scripts that are parsing 4000+ record CSV files, and they are DOG slow. They take over 140 seconds to complete (that's an eternity to wait for a web page to load). What's driving me nuts is that the same code, in a straight python file, fires off and completes in under 2 seconds using the same CSV file. How can I speed up the Python script on my server? Are external methods faster? TIA Rick
On Wed, 15 Oct 2003 17:00:23 -0700 GMT D. Rick Anderson asked the Zope mailinglist about the following:
I have a few python scripts that are parsing 4000+ record CSV files, and they are DOG slow. They take over 140 seconds to complete (that's an eternity to wait for a web page to load). What's driving me nuts is that the same code, in a straight python file, fires off and completes in under 2 seconds using the same CSV file. How can I speed up the Python script on my server? Are external methods faster?
try external methods, yes. :) -- __________________________________________________________________ Geir Bækholt · Interaction Architect · Plone Solutions Development · Training · Support · http://www.plonesolutions.com __________________________________________________________________
D. Rick Anderson wrote at 2003-10-15 17:00 -0700:
I have a few python scripts that are parsing 4000+ record CSV files, and they are DOG slow. They take over 140 seconds to complete (that's an eternity to wait for a web page to load). What's driving me nuts is that the same code, in a straight python file, fires off and completes in under 2 seconds using the same CSV file. How can I speed up the Python script on my server? Are external methods faster?
External Methods are considerably faster as they do not make the costly security checks on each attribute access. Dieter
participants (3)
-
D. Rick Anderson -
Dieter Maurer -
Geir B�kholt