Tcl Source Code

View Ticket
Login
Ticket UUID: 1020491
Title: ::http::formatQuery takes 5x longer for twice the data
Type: Bug Version: obsolete: 8.4.7
Submitter: nobody Created on: 2004-09-01 15:13:18
Subsystem: 29. http Package Assigned To: dkf
Priority: 5 Medium Severity:
Status: Deleted Last Modified: 2005-01-06 18:39:04
Resolution: Fixed Closed By: dkf
    Closed on: 2005-01-06 11:39:04
Description:
source:
package require http

set in [open submit.log r]
set log [read $in]
set submission [::http::formatQuery email 
[email protected] userid 58276954 format DSHIELD tz -
04:00 log $log Submit submit]
# set token [::http::geturl 
http://www.dshield.org/report.php -query $submission]
# puts [::http::code $token]
# ::http::cleanup $token
close $in

email [email protected]
This program opens a log file and uses HTTP POST to 
submit to a website. See an example of the log file 
attached as bug.log. When this program is run with 1250 
lines in the log, it takes 16 seconds (Pentium M laptop 
1.3 GHz). If the number of lines is 2500, the program 
takes 75 seconds to run. Somehow the processing 
in ::http::formatQuery does not scale well. I am using 
the ActiveState distro of TCL 8.4.7.0 with HTTP 
package 2.5.0
User Comments: dkf added on 2005-01-06 18:39:04:
Logged In: YES 
user_id=79902

This comes down to http::mapReply being horribly
inefficient.  Recoding to use [string map] should make an
enormous difference!

Fixed in 8.4 branch and HEAD.

nobody added on 2004-09-01 22:13:18:

File Added - 99982: bug.log

Attachments: