Wednesday, April 23, 2008

Magic Trick

Magic trick for Kubuntu users:

1. Make an empty new directory ~/.compose-cache
2. Start a KDE application which has a text input widget (anything with a line edit or editable combo box will do)
3. Check ~/.compose-cache, it should now have a file in it whoose name is a long string of numbers

All being well, your Qt/KDE/Gtk applications should now start up 50-150ms faster.

Users of other distros are welcome to give it a try, I have only been able to test directly on Kubuntu. If you have a non-empty /var/cache/libx11/compose folder (eg. SuSE users) then this optimization is already enabled so you don't need to do anything.

For those curious about what is going on here, this enables an optimization which Lubos (of general KDE speediness fame) came up with some time ago and was then rewritten and integrated into libx11. Ordinarily on startup applications read input method information from /usr/share/X11/locale/<your locale>/Compose. This Compose file is quite long (>5000 lines for the en_US.UTF-8 one) and takes some time to process. libX11 can create a cache of the parsed information which is much quicker to read subsequently, but it will only re-use an existing cache in /var/cache/libx11/compose or create a new one in ~/.compose-cache if the directory already exists.

Relevant freedesktop.org bug report

Saturday, April 19, 2008

Konsole - KDE 4.1 Changes

I had a few emails recently asking for a summary of changes in the terminal and in particular 'Send Input to All' which was missing from KDE 4.0. So here are the changes in 4.1, in addition to the many bug fixes and tweaks.

  • Copy Input To dialog allows input to one session to be copied to all or a subset of other sessions. (Like 'Send Input to All' in KDE 3 but more flexible)

  • Drag and drop re-arrangement of tabs and movement of tabs between windows.

  • Better warnings and fallbacks if starting the shell fails (due to missing binary or crash).

  • Transparency is available by default (with an option to forcibly disable it)

  • Support for bi-directional text rendering. (Diego Iastrubni)

  • New 'Dark Pastels' colour scheme (adapted from one by Christoffer Sawicki)

  • Mouse-wheel scrolling in less and other non-mouse enabled terminal applications

Nothing ground breaking here but it should make KDE 4.1 a nice step forwards from KDE 3.5 for those who have stayed away from KDE 4.0.

In other news, like several other KDE developers I have started using git and git-svn locally. It is a huge improvement over SVN, especially when developing experimental features that touch many parts of the code alongside bug fixes to the current trunk. It does make you wonder how you ever managed before. A quick "git branch" on my current local checkout shows 10 branches for various little features in progress, for example:

custom-pty-fd
image-background
inheritance-ui
* master
port-to-mono
profile-editor-binding
profile-editor-improvements
window-tab-settings

Interestingly though and perhaps paradoxically given the open nature of the project, one of the most useful benefits is the ability to create branches to work on features without telling the whole world. There is much emphasis on the benefits of incremental development but at the same time I think it is important to be able to do some things in private so that they can arrive on the scene with a bang that gets attention. Compiz or git being good examples.