| Description: |
OriginalBugID: 3220 Bug
Version: 8.0.5
SubmitDate: '1999-10-28'
LastModified: '2000-04-09'
Severity: SER
Status: Released
Submitter: techsupp
ChangedBy: hobbs
RelatedBugIDs: 2824 2239 3410 2875
OS: IRIX
OSVersion: IRIX64 6.5
Machine: Other
FixedDate: '2000-04-09'
FixedInVersion: 8.3
Name: Jamie Hecker
Comments:
I originally reported this bug as a problem with tclpro1.2, but further
testing (and help from scriptics) has pointed out that it appears to be
inherent in all versions of tcl/tk after 8.0.3. There is a substantial
difference in speed between 8.0.3 and 8.0.5 and above (I have tried
8.2.0 and had the same problem).
ReproducibleScript:
proc test {} {
set top [toplevel .toplevel]
::wm geometry $top 400x800+600+100
set canvas [canvas $top.sc -width 400 -height 1000]
frame $canvas.win -width 100 -height 1000
$canvas create window 300 25 -window $canvas.win -anchor n
for {set i 1} {$i <= 200} {incr i} {
$canvas create text 10 [expr $i * 50] -text "simple text row $i" -anchor w
scale $canvas.win.scale$i -width 5 -label "scale2 $i" -orient horizontal -length 100
place $canvas.win.scale$i -in $canvas.win -x 0 -y [expr $i * 50] -anchor w
}
place $top.sc -x 0 -y 0
return $top
}
for {set i 0} {$i < 100} {incr i} {
set iteration_time [time "test; update idletasks; destroy .toplevel
"]
puts "$i: $iteration_time"
}
ObservedBehavior:
the test case runs approximately 7 times slower after 99 iterations on
8.0.5. on 8.0.3 the difference is small (in fact the speed it takes on
its 99th iteration on 8.0.3 is faster than the first iteration on
8.0.5). I have run the test case on Windows NT, and did not see the
same performance degredation (under 8.0.5), so it appears to be IRIX
specific
DesiredBehavior:
Since the nature of our application requires that widgets be created
and destroyed very often, I would hope that this operation would have
little impact on the performance of the application.
The performance problem is potentially due to TK_USE_INPUT_METHODS,
which gets defined in tk.h. Try to #define that out and see if
the performance problem disappears. Starting with 8.3, we are
moving towards getting that #def runtime switchable, with the
default off.
-- 01/07/2000 hobbs
The related reports all have some similar slowdown seen, relating
to impaired usage over time or extensive widget creation.
-- 01/25/2000 hobbs
It has been confirmed that moving the XInputMethods code to a
runtime conditional (tk useinputmethods boolean) has eliminated
this slowdown for 8.3+. For earlier versions, make sure to compile
with the XInputMethods undefined (tk.h). You can see the effect
by running Tk8.3 on a previously affected machine with and without
[tk useinputmethods] set (default off).
This seems to be an xserver related problem, as not all xservers
with XInputMethods are affected. The problem is likely some leak
in system level resources.
-- 04/09/2000 hobbs
|