I got 13 seconds using the ADP that Simos sent me. I also got 13 seconds using my own ADP form. This was for a 4MB file going to a 500MHz PIII on a dedicated 100MBit network at home. Here are the two ADPs:
<html> <head> <title>Test File Upload</title> </head> <body> <form enctype=multipart/form-data method=post action="<%=[ns_conn url]%>"> <input name=clientfile type=file> <input type=text name=destpath value="/tmp/blah" size=80> <input type="submit" VALUE="Submit"> </form> <% if { [ns_conn method]=="POST" } { ns_log notice "XXX>>>> starting upload..." set ctbegin [clock seconds] set remotefile [ns_queryget path] set uploadfilename [ns_queryget clientfile] set tmpfile [ns_queryget clientfile.tmpfile] set ctend [clock seconds] set ct [expr $ctend - $ctbegin] ns_log notice "XXX>>>> upload complete: total time: $ct" ns_log notice "XXX>>>> filename is $uploadfilename" ns_log notice "XXX>>>> uploaded file into $tmpfile" } %> </body> </html> === Simos's ADP === <HTML> <HEAD> <TITLE>Test File Upload</TITLE> </HEAD> <BODY> <form enctype=multipart/form-data method=post action="<%=[ns_conn url]%>"> <input name=file type=file> <input name=submit type=submit value="submit"> </form> <% if { [ns_conn method]=="POST" } { set fn [ns_tmpnam] set fd [open ${fn}.headers w] set headers [ns_conn headers] for {set i 0; set n [ns_set size $headers]} {$i < $n} {incr i} { puts $fd "[ns_set key $headers $i]: [ns_set value $headers $i]" } close $fd set fd [open ${fn}.body w] fconfigure $fd -translation binary set t1 [time {ns_conncptofp $fd}] close $fd ns_return 200 text/plain "headers in ${fn}.headers body in ${fn}.body Time to write content to file: $t1 " } %> </body> </html> /s. -+-+-+-+-+-+-+-+-+-+-+-+- If to err is human, I must be more human than most. Scott S. Goodwin u: http://scottg.net e: [EMAIL PROTECTED] p: 850.897.6830 aim: scottgnet ----- Original Message ----- From: "Rusty Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 18, 2002 3:24 PM Subject: Re: [AOLSERVER] File uploading > > I'm going to look into this a bit and see if it actually is the > > problem. If so it may help to make form.tcl into a C module to speed > > things up. > > OK, I uploaded a 2 meg file. > > It took 11.16 seconds total. 11.12 seconds of that was looking for file > boundaries. I simply placed "time" tcl commands at strategic places in > form.tcl to test this. > > Rusty >