cgi.py performance

Jon Ribbens jon+usenet at unequivocal.co.uk
Fri Apr 5 08:45:16 EST 2002


In article <a8i60e$csg$1 at web1.cup.hp.com>, jimh wrote:
>> You could try jon.cgi from jonpy, it might be more efficient.
>> http://jonpy.sourceforge.net/
> 
> Hey, that looks pretty cool.  I do have one question before I try it out: in
> mime.py, Entity.__init()__, which splits up the data on the boundaries,
> loads the entire file at once, if I am not mistaken ("msg = fp.read()").
> What will happen if I am transferring a very large file, 50-100MB?

In theory: your computer uses as much RAM as it has, then starts using
swap space instead. So it's like using a temporary file except it uses
as much RAM as possible first, which makes it more efficient.

That's the idea anyway. I haven't tested it with huge files because
I've never had the need to use even reasonably large files. I'd be
very interested in your experiences if you try it.



More information about the Python-list mailing list