Posted to tcl by de at Mon Jul 14 17:39:28 GMT 2014view pretty

# Using the same tktable binary I see a huge speed difference between
# 
# tcl/tk 8.5.8 (all fine and good)
#
# and
# 
# tcl/tk 8.6.1 (waaay too slow)
# 
# Just try to scroll down.

package require Tk
package require Tktable

proc cellcmd {row column} {
    return [string repeat "$row, $column " 100]
}

scrollbar .hs -orient horizontal -command ".table xview"
scrollbar .vs -orient vertical -command ".table yview"

table .table \
    -cols 20 \
    -rows 1000000 \
    -colstretchmode none \
    -xscrollcommand ".hs set" \
    -yscrollcommand ".vs set" \
    -command {cellcmd %r %c} \
    -usecommand 1 \
    -cache 0

grid .table -row 0 -column 0 -sticky news
grid .vs -row 0 -column 1 -sticky ns
grid .hs -row 1 -column 0 -sticky we

grid rowconfigure . 0 -weight 1
grid columnconfigure . 0 -weight 1

wm geometry . 1000x800