X11 anti-aliasing slow?

My quest in finding faster X11 environment lead from WindowMaker to ion3, dwm and finally awesome. I would be very pleased with speed improvement if latest version of awesome didn't have xft support. Now I have to find and disable something I never needed in the first place, ehhh...

Have in mind that I do have laptops with more and more CPU power, so it's not that I use newer versions of software on some old crufty hardware (which I actually do from time to time, but that's not the point). Also, have in mind that I actually do like anti-aliased fonts but not in terminals and window managers.

What's wrong with anti-aliases fonts in terminals?

Glad you asked. Instead of trying to explain that (and failing), do a little test:

  • Pick any anti-aliased font in your terminal of choice
  • Execute find . in some directory with reasonable amount of files (home dir comes to mind)
  • Notice flickering on scroll? After a while it gets better (I guess that xfs cache some anti-alias information)
  • Now pick some fixed bitmap font and re-run find .
  • If you didn't notice difference in speed and flicker of scrolling you might be using terminal without xft support or bitmap font already.

But, anti-alias can't be that slow!

Nice try... Let's try another experiment. Open your ~/.fonts.conf and add something like:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <dir>~/.fonts</dir>
 <!-- bitmap fonts -->
 <dir>/usr/X11R6/lib/X11/fonts</dir>
 <match target="font" >
  <edit mode="assign" name="hinting" >
   <bool>true</bool>
  </edit>
 </match>
 <match target="font" >
  <edit mode="assign" name="hintstyle" >
   <const>hintmedium</const>
  </edit>
 </match>
 <!-- antialias tweaks -->
 <match target="font">
  <test compare="more" name="pixelsize" qual="any">
   <double>9</double>
  </test>
  <test compare="less" name="pixelsize" qual="any">
   <double>15</double>
  </test>
  <edit mode="assign" name="antialias">
   <bool>false</bool>
  </edit>
 </match>
 <match target="font">
  <test name="weight">
   <const>bold</const>
   <const>black</const>
  </test>
  <edit name="antialias" mode="assign">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
   <edit name="rgba" mode="assign"><const>rgb</const></edit>
 </match>
</fontconfig>

This is my current configuration, you might want to skip rgba part if your LCD or CRT is different than mine...

Now re-try browsing in firefox (iceweasel, whatever). Do you notice something? Yes, it's faster. Even on dual core T2500. Isn't that somewhat strange?

To be quite honest, I'm running vesa graphic drivers. But, that's because my T60 has ATI Technologies Inc M52 [ATI Mobility Radeon X1300] card which isn't supported under current unstable Debian with any other driver (fglrx from Debian and xf86-video-avivo and/or xf86-video-radeonhd from upstream git). So, I have something to say about drivers also...

Is there any way to make anti-alias faster? Does compiling my own fontconfig might make a difference? I'll have to find out one day if there isn't any response to this post...