fil open close very slow

Robert Robert robertrobert93 at yahoo.com
Sat Aug 1 09:34:58 CEST 2009


hiya all,
I have a "large" script written in python. There is in that big script at a certain point a loop in which I create a lots of simple small text files. Each text file just contain I think 4 or 5 short lines. When I simply run it in IDLE, it runs fast. But when I compile it to binary files, it becomes very slow. I turned on the profiler and discorvered it was slow at the open() and close() calls. I removed those calls to confirm this, and yes my program runs very fast then. Does anyone has an idea or suggestion why this can be possible. I only compile them to .pyc files, which as what I see, when I normally run in IDLe these files are created as well, so I really got no clue.
rh.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090801/48a6b81b/attachment.html>


More information about the Python-list mailing list