cgitb performance issue

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu May 15 04:22:37 EDT 2008


En Wed, 14 May 2008 13:51:40 -0300, Ethan Furman <efurman at admailinc.com>  
escribió:
> Gabriel Genellina wrote:
>> En Mon, 05 May 2008 15:56:26 -0300, Ethan Furman  
>> <efurman at admailinc.com> escribió:
>>
>>> I tried adding a form to our website for uploading large files.
>>> Personally, I dislike the forms that tell you you did something wrong
>>> and make you re-enter *all* your data again, so this one cycles and
>>> remembers your answers, and only prompts for the file once the rest of
>>> the entered data is good.  However, the first time the form loads it  
>>> can
>>> take up to 30 seconds... any ideas why?
>>
>> Hard to tell without looking at the code... And what has cgitb to do  
>> with this?
>>
> Hmmmm... excellent question, and the answer is -- Nothing.  My
> apologies.  I'm importing cgi (cgitb was while I was debugging it), as
> well as a bunch of others.
>
> Here's the source, with a bunch of the actual html stripped out.  The -u
> as well as the last two lines were an attempt to eliminate the 30-second
> pause while it loads, as it seems to get all data transferred, then just
> waits for a while.  Any ideas appreciated.  My apologies for the ugly  
> code.

*When* do you see the 30-secs delay? After uploading the files? I see  
they're transferred using SMTP, but I think you're not talking about the  
time it takes to send the mail.
I'd use the old-fashioned "print" statement to see *what* gets executed  
and how long it takes each step.

-- 
Gabriel Genellina




More information about the Python-list mailing list