Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2005-05-30
09:05 • Ticket [1068167fff] Setting many elements in env array seems to cause endless lo... artifact: 024152ab98 user: hobbs
09:05 • Closed ticket [1068167fff]. artifact: ef9351f55e user: hobbs
2004-11-17
18:03 • New ticket [1068167fff]. artifact: 80dede9777 user: nobody

Setting many elements in env array seems to cause endless lo

Closed / Invalid1068167fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2004-11-17 18:03:22
Richard Suchenwirth: I misunderstood the description at 
1042910 and tried, on Win XP and tclsh 8.4.2, the 
following:

for {set i 0} {$i < 33333} {incr i} {set env(V$i) $i}

The command does not return for many minutes, CPU 
usage goes up to 50% (which is 100% hyperthreaded). 
Memory requirement increases very slowly - say 6KB in 
30 seconds.
hobbs Closed ticket [1068167fff]. [History diff]2005-05-30 09:05:16
hobbsplain2005-05-30 09:05:17
Logged In: YES 
user_id=72656

This is just a slow op, as it does finish.  Note that 'env'
is a trace var that does lots of other ops.  It is shared
amongst all interps and tied to the system environment.  You
just don't want to overload it.
Log in (anonymous is fine) to add a comment.