I was just curious how fast can a terminal window (in X) get a refresh draw. So I wrote a script to test, termfps.sh. It prints characters to fill up the whole window by default, then reset the cursor to home using ANSI escape code. Print again, doing so for 100 times by default. 100 / elapsed time is the FPS.

I ran several tests using ./termfps.sh 1000 80 25. I used 80 by 25 because that’s my VT’s terminal size, and I maximize window before I run the test. Here are the result for 80x25 and 1000 frames, sort by fps:

terminal elapsed time fps
urxvtc1 08.882 112.580
urxvtc 09.126 109.574
urxvt 09.140 109.401
urxvtc + tmux2 10.568 094.616
urxvtc + tmux 10.546 094.813
urxvtc + tmux3 11.214 089.173
xterm 16.487 060.653
lxterminal 39.211 025.502
vt1 54.984 018.187
[1]no .Xdefaults
[2]with -2, in right panel of two
[3]with -2, in left panel of two

The slowest one is vt1, I didn’t test framebuffer. urxvt is my terminal, but I also have xterm installed. I installed lxterminal for vte-based terminal test. My normal urxvt uses Rxvt.font: xft:Envy Code R:style=Regular:size=9:antialias=false. I ran more on urxvtc, invoked without .Xdefaults, so I could test without changes I made. Since I use tmux, I tested tmux invoked with 256 colors or not, running in a panel.

This script can’t test the real FPS since Bash script takes some time to process, but the results aren’t really much lower and it does show the significant difference between terminals, or those FPS should all be capped around a same number. As you can see, urxvt runs fastest, then xterm, then lxterminal. Though there are some configuration differences, say the fonts, but it’s quite conclusive from the numbers I see.

For maximized urxvt+tmux terminal window I normally use in one screen with video played in another screen, here is the result:

For 239x65 100 frames, elapsed time: 18.567 seconds
Frames per second: 5.385