qtile/qtile — pull request #347 by dequis (2013-09-15 07:44:21+00:00)
Title: Bar draw queue: only draw the bar when idle

bar.draw() now doesn't do the actual drawing, but calls gobject.idle_add
to call bar._actual_draw() later, when the glib mainloop is 'idle',
which is generally the next X event loop iteration.

In my setup this saves 43 calls to draw(), which makes it feel much
faster. It turns out that we do a lot of draws everywhere, so this is a
tiny hack that could improve the CPU usage significantly in some
situations.