Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-01-06
18:39 • Ticket [1020491fff] ::http::formatQuery takes 5x longer for twice the data s... artifact: 9fee74af3d user: dkf
18:39 • Deleted ticket [1020491fff]. artifact: 85f9a5092b user: dkf
17:33 • Ticket [1020491fff]: 1 change artifact: b4e110a197 user: dkf
11:34
Fix performance nasty in http::mapReply [1020491] and clean up version numbers. check-in: 45ad0f150c user: dkf tags: core-8-4-branch
11:15
Performance updates to http::mapReply [1020491] and fix version numbering. check-in: 78058a0d6f user: dkf tags: trunk
2004-09-01
22:13 • Ticket [1020491fff] ::http::formatQuery takes 5x longer for twice the data s... artifact: cfd885beaf user: nobody
22:13 • Add attachment bug.log to ticket [1020491fff] artifact: dd2893514a user: nobody
15:13 • New ticket [1020491fff] ::http::formatQuery takes 5x longer for twice the data</... artifact: 94f7267075 user: nobody

::http::formatQuery takes 5x longer for twice the data

Deleted1020491fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-09-01 15:13:18
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
nobodyplain2004-09-01 22:13:18
File Added - 99982: bug.log
dkf Ticket [1020491fff]: 1 change [History diff]2005-01-06 17:33:32
dkf Deleted ticket [1020491fff]. [History diff]2005-01-06 18:39:03
dkfplain2005-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.
Log in (anonymous is fine) to add a comment.

Attachments: