[Tutor] question about run time

Hugo González Monteverde hugonz-lists at h-lab.net
Wed May 3 21:51:30 CEST 2006


I have made scripts that work on many files (sometimes just some tens) 
and appears that filesystem structure caching in Linux is very 
efficient.  That's why it runs very fast later.

I've seen this in Slackware, Debian, and RH, so I guess it's just a 
linux/FS/disk thing.

Try doing 'find' combined with md5sum or something disk-intensive, but 
unrelated with python to see if it exhibits the same problem.

Hugo

Ertl, John wrote:
> I have been using python for sometime...and occasionally I noticed
> significant delay before the code would run but unitl now I have been able
> to write it off to other things.  Now I have a short script that I wrote to
> check some files and print out a few lines.
> 
> I have noticed that usually the first time I fire it up in the morning or
> after a long time of not running it, it takes 10-15 seconds to run and the
> output to the screen is very slow...maybe 1 second per line.  If I run it
> soon after that it runs and the output is on the screen in less then a
> second.  I would think this has to do with compiling but I am not sure.  Any
> ideas how to speed this up?  
> 
> I am running python 2.4 on a RHE3.0 cluster. 
> 
> Thanks,
> 
> John Ertl
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 


More information about the Tutor mailing list