[Tutor] same python script now running much slower

Steven D'Aprano steve at pearwood.info
Tue Dec 31 02:47:52 CET 2013


Hi Meridith, and welcome.

On Mon, Dec 30, 2013 at 06:37:50PM +0000, Protas, Meredith wrote:

> I am using a python script generated by another person.  I have used 
> this script multiple times before and it takes around 24 hours to run.  
> Recently, I have tried to run the script again (the same exact command 
> lines) and it is much much slower.  I have tried on two different 
> computers with the same result.  

Unfortunately, without knowing exactly what your script does, and the 
environment in which it is running, it's hard to give you any concrete 
advice or anything but questions. If the script is performing 
differently, something must have changed, it's just a matter of 
identifying what it is.

- What version of Python were you running before, and after?

- Does the script rely on any third-party libraries which have been 
upgraded?

- What operating system are you using? Is it the same version as before? 
You mention top, which suggests Linux or Unix.

- What does your script do? If it is downloading large amounts of data 
from the internet, has your internet connection changed? Perhaps 
something is throttling the rate at which data is downloaded.

- Is the amount of data being processed any different? If you've doubled 
the amount of data, you should expect the time taken to double.

- If your script is greatly dependent on I/O from disk, a much slower 
disk, or heavily-fragmented disk, may cause a significant slowdown.

- Is there a difference in the "nice" level or priority at which the 
script is running?

Hopefully one of these may point you in the right direction.

Would you like us to have a look at the script and see if there is 
something obvious that stands out?



-- 
Steven


More information about the Tutor mailing list