'Update' Is Wasting Processor Time

The old implementation since wish8.6 is doing superfluous update computations, test this script:

pack [text .t -height 40 -wrap word]
append str "A very " [string repeat "long " 40000] "line. \n"
.t insert end $str
update

# Wait 15 seconds, and update every half second:
for {set i 0} {$i < 30} {incr i} {
  after 500
  update
}

exit 0

These are the measurements with memtime (Linux):

Revised: 0.84 s
wish8.5: 1.08 s
wish8.6: 14.80 s
wish8.7: 68.58 s

Note that the revised version is based on wish8.6 (pl 6), so we can conclude that the text widget implementation is the causer of this processor load.