cgi.py performance

jimh jim at jim.jim
Wed Apr 3 22:39:14 EST 2002


I am using cgi.py to handle the transfer of large incoming files.  Because
of the way that cgi.py handles multipart/form-data, the performance is VERY
poor.  I have rewritten read_lines_to_outerboundary() to process the
incoming data in large (binary) chunks and have gotten the performance of a
40MB file from 1:41 down to just 15 seconds(!).  However, there are some
assumptions that I have made about multipart/form-data format (even though I
have read the RFC) as well as the workings of FieldStorage (some parts are
still a little fuzzy to me).

I guess my first question should be: has something already been done to
address the performance of multipart/form-data?  And if not, could I get
what I have written reviewed?

Jim






More information about the Python-list mailing list