summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6fb735a)
raw | patch | inline | side by side (parent: 6fb735a)
author | Paul Mackerras <paulus@samba.org> | |
Tue, 31 Oct 2006 04:00:53 +0000 (15:00 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sat, 23 Jun 2007 10:58:06 +0000 (20:58 +1000) |
For some unknown reason, changing the scrolling region on the canvases
provokes multiple milliseconds worth of computation in the X server,
and this can end up slowing gitk down significantly. This works around
the problem by limiting the rate at which we update the scrolling region
after the first 100 rows to at most 2 per second.
Signed-off-by: Paul Mackerras <paulus@samba.org>
provokes multiple milliseconds worth of computation in the X server,
and this can end up slowing gitk down significantly. This works around
the problem by limiting the rate at which we update the scrolling region
after the first 100 rows to at most 2 per second.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index d6ed4f6c4050b3a4f0db462d531f6e7a161c1bfb..d5b71dd45dd2aa03050074c086d355a87fb76efb 100755 (executable)
--- a/gitk
+++ b/gitk
proc showstuff {canshow last} {
global numcommits commitrow pending_select selectedline curview
global lookingforhead mainheadid displayorder nullid selectfirst
+ global lastscrollset
if {$numcommits == 0} {
global phase
allcanvs delete all
}
set r0 $numcommits
+ set prev $numcommits
set numcommits $canshow
- setcanvscroll
+ set t [clock clicks -milliseconds]
+ if {$prev < 100 || $last || $t - $lastscrollset > 500} {
+ set lastscrollset $t
+ setcanvscroll
+ }
set rows [visiblerows]
set r1 [lindex $rows 1]
if {$r1 >= $canshow} {