Skip to content

Psssst.... KDE konsole is more efficient than xterm

Saturday, 7 May 2005  |  pipitas


Sometimes you learn surprising things while you drive a car.

Last time this happened was on Thursday evening. SambaXP conference had ended in Goettingen, and I gave Tridge a lift to the Frankfurt Airport. For me it was only a very little detour on my way to Stuttgart. Tridge had a 30 hour journey back home to Australia in front of him (21 hrs of pure flight time).

During the 2-hour ride we chatted about various things, mostly technical in nature. Things covered were Samba4, its extensive usage of ldb (embedded LDAP-like database) to make it a full Active Directory domain controller, and various other topics. Tridge is a very patient and friendly person when it comes to explaining complex technical questions to a non-coder like myself. At one time we happened to touch on the question of performance in X applications. I mentioned how well konsole worked as a replacement of multiple xterms, when you use its tab feature.

Now Tridge is a KDE user, but he was sitting on the co-driver seat and looking at his notebook screen with some opened xterms running on his KDE desktop. He told me that he used xterms because he knew all their features so well, since many years. He didnt seem to like "bloated GUIs" while using a terminal. And it was important to him to use the screen estate taken by scrollbars for more display room and instead just hit [CTRL]+[PgUp] or [CTRL]+[PgDown] to scroll back and forth. OK, no big deal. Konsole can do both, switch off scrollbars and use these very shortcuts for scrolling. Moreover, it can bind its shortcuts to almost any key combo you come up with, just as you please. Tridge started konsole to look at it for the first time since long ago. He discovered konsole's "fullscreen mode" which he seemed to like a lot.

Most important to him is that scrolling does happen very efficiently, since he uses it a lot when coding or reading mail. Being the hacker he is, he applied two very simple tests to verify how much he'd loose when he switched from xterm to konsole: measure the time to run an ls -lR in a large source directory with many subdirs, and measure time for a cat /usr/dict/words.

I had never run such a test. All I was aware of were Aaron's memory usage benchmarklets (which had been the basis for my "You can efficiently replace multiple xterms with one tabbed console window"-argument towards Tridge).

So we were both very surprised. to see konsole not only being close to xterm's performance, but being more than double as efficient! Tridge is now considering to switch from xterm to konsole, probably after giving it a day or two of "probationary period".

Today I remembered that little episode, but wasn't sure any more about the figures. So I repeated the experiments. The glorious results are here:

+-----------------------------------------------------------------------------------------------+
|                                 konsole vs. xterm performance                                 |
+-----------------------------------------------+-----------------------------------------------+
|   konsole                                     |    xterm                                      |
+-----------------------------------------------+-----------------------------------------------+
| kurt@p9004:~> time cat /usr/dict/de/all.words | kurt@p9004:~> time cat /usr/dict/de/all.words |
| Aachen                                        | Aachen                                        |
| (....)                                        | (....)                                        |
| zzgl                                          | zzgl                                          |
|                                               |                                               |
| real 0m5.481s                                 | real 0m15.527s                                |
| user 0m0.005s                                 | user 0m0.005s                                 |
| sys  0m0.128s                                 | sys  0m0.124s                                 |
+-----------------------------------------------+-----------------------------------------------+
| kurt@p9004:~/SVNstuff/samba> time ls -lR .    | kurt@p9004:~/SVNstuff/samba> time ls -lR .    |
| (....)                                        | (....)                                        |
|                                               |                                               |
| real 0m1.441s                                 | real 0m4.275s                                 |
| user 0m0.123s                                 | user 0m0.309s                                 |
| sys  0m0.156s                                 | sys  0m0.196s                                 |
+-----------------------------------------------+-----------------------------------------------+

Are you also, like me, curious about how other terminal emulators work as compared to xterm? Well, I did a short showdown of xterm vs. gnome-terminal too. The good news to our Gnome-friends is: gnome-terminal also beats xterm! Look at these figures:

+-----------------------------------------------------------------------------------------------+
|                             gnome-terminal vs. xterm performance                              |
+-----------------------------------------------+-----------------------------------------------+
|    gnome-terminal                             |    xterm                                      |
+-----------------------------------------------+-----------------------------------------------+
| kurt@p9004:~> time cat /usr/dict/de/all.words | kurt@p9004:~> time cat /usr/dict/de/all.words |
| Aachen                                        | Aachen                                        |
| (....)                                        | (....)                                        |
| zzgl                                          | zzgl                                          |
|                                               |                                               |
| real 0m14.092s                                | real 0m15.527s                                |
| user 0m0.005s                                 | user 0m0.005s                                 |
| sys  0m0.132s                                 | sys  0m0.124s                                 |
+-----------------------------------------------+-----------------------------------------------+
| kurt@p9004:~/SVNstuff/samba> time ls -lR .    | kurt@p9004:~/SVNstuff/samba> time ls -lR .    |
| (....)                                        | (....)                                        |
|                                               |                                               |
| real 0m3.409s                                 | real 0m4.275s                                 |
| user 0m0.136s                                 | user 0m0.309s                                 |
| sys  0m0.152s                                 | sys  0m0.196s                                 |
+-----------------------------------------------+-----------------------------------------------+

Please don't take these results too seriously. Do not regard them as anything close to a scientific benchmark. I bet you could tweak them in many ways, depending for instance on the font the various terminals use.

Just take them as what they were to me: the result of my default workstation environment (KDE HEAD from latest CVS, self-compiled with --enable-debug) and Gnome (with gnome-terminal 2.8.0 as installed on an apt4rpm-updated SUSE-9.1). And a reason to be proud of KDE, that we can confidently advertise even to people who are looking for the highest performance they can get.