[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#389476: xterm: ansi color slows scrolling down



Package: xterm
Version: 210-3
Severity: minor


I've noticed that there is a considerable slowdown in scrolling speed
when lines contain ansi-color codes that change the background (!)
colour.

This slowdown is hardly noticeable on a reasonably fast machine, but
on my trusty old toshiba libretto (only 266 Mhz, but I'll never part
with it) listing a directory with 200 files with ls --color=yes is
unbearably slow.

This must have crept in a few updates ago, I can't remember scrolling
being that slow on the laptop before. It's not fixed in 210-3.1
(tested on the laptop, uses same distribution and software, but
neomagic display hardware) and not in upstream (220) either.

The following loop in a bash tests that behaviour:

bogomips=`grep bogomips /proc/cpuinfo|tail -1|cut -f2 -d:|cut -f1 -d.`; wallclock=`date +%s`;i=0; while [ $i -lt $bogomips ]; do echo -e "\033[47m$i\033[00m"; i=$(($i + 1)); done; echo $((`date +%s` - $wallclock)) seconds

Outputs numbers up to $bogomips with white background. Will take about
10 seconds on my athlon 550 at home and the machines at work (intel
2800 mhz), and about 55 seconds on my laptop. I assume something
causes additional sluggishness on the laptop (maybe the display
driver? There's an old bug at
https://bugs.freedesktop.org/show_bug.cgi?id=1877 which might be
related).

The slowdown only happens when the background colour is changed, so if
you change the first escape sequence in the echo string to e.g.
"\033[31m" (red foreground) the whole loop takes about 1 second.

Also there is no slowdown in rxvt, on any machine.

I think this should probably be forwarded to upstream but I'd like it
to be in the debian BTS nonetheless.

Finally I manage to hit a bug that is actually reproducible! :)

Kind regards
     Friedel
-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8) (ignored: LC_ALL set to de_DE.utf8)

Versions of packages xterm depends on:
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libfontconfig1               2.3.2-7     generic font configuration library
ii  libice6                      1:1.0.0-3   X11 Inter-Client Exchange library
ii  libncurses5                  5.5-2       Shared libraries for terminal hand
ii  libsm6                       1:1.0.0-4   X11 Session Management library
ii  libx11-6                     2:1.0.0-8   X11 client-side library
ii  libxaw7                      1:1.0.2-4   X11 Athena Widget library
ii  libxext6                     1:1.0.1-2   X11 miscellaneous extension librar
ii  libxft2                      2.1.8.2-8   FreeType-based font drawing librar
ii  libxmu6                      1:1.0.1-3   X11 miscellaneous utility library
ii  libxt6                       1:1.0.0-5   X11 toolkit intrinsics library
ii  xbitmaps                     1.0.1-2     Base X bitmaps

Versions of packages xterm recommends:
ii  xutils                        1:7.1.ds-1 X Window System utility programs

-- no debconf information



Reply to: