I was creating 2000 wiboxes in a loop (don't ask) and creating them took
forever. According to callgrind, there were about 2 million calls to
xcb_configure_window() and most (if not all) of them were from client_stack().
Awesome spent 70% of its cpu time in these client_stack() calls.
client_stack() is O(N^2) on the number of clients (it walks the list of clients
itself twice and each call to client_stack_above() walks the list too) and O(N)
on the number of wiboxes (it walks the wibox list twice). So obviously calls to
it should be rare.
This patch makes client_stack() only set a flag which is later checked. This
should reduce the number of restacks to the bare minimum. With this patch,
neither xcb_configure_window() nor anything else client_stack() related shows
up as having a lot of calls or using much cpu time.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
awesome
=======
awesome is a highly configurable, next generation framework window manager for X.
Requirements
------------
In order to build awesome itself, you need header files and libs of:
- cmake (>= 2.6)
- Xlib
- xproto
- xcb (>= 1.1)
- xcb-util (>= 0.3)
- Lua (>= 5.1)
- cairo built with xcb support
- pango and pangocairo (>= 1.19.3)
- libev
- Imlib2
- dbus (optional, use -DWITH_DBUS=OFF with cmake to disable)
- gperf
In order to build the awesome man pages and documentation,
you need these tools:
- asciidoc
- xmlto
- docbook XSL stylesheets
- luadoc
In order to build the source code reference, you need these tools:
- doxygen
- graphviz
Building and installation
-------------------------
After extracting the dist tarball, run:
make
This will create a build directory, run cmake in it and build awesome.
After the building done, you can type this to install:
make install # might need root permissions
Running awesome
---------------
You can directly select awesome from your display manager. If not, you can
add the following line to your .xinitrc to start awesome using startx
or to .xsession to start awesome using your display manager:
exec awesome
In order to connect awesome to a specific display, make sure that
the DISPLAY environment variable is set correctly, e.g.:
DISPLAY=foo.bar:1 exec awesome
(This will start awesome on display :1 of the host foo.bar.)
Configuration
-------------
The configuration of awesome is done by creating a $XDG_CONFIG_HOME/awesome/rc.lua file.
An example is provided in the sources.
Troubleshooting
---------------
In most systems any message printed by awesome (including warnings and errors)
are written to $HOME/.xsession-errors.
If awesome does not start or the configuration file is not producing the desired
results the user should examine this file to gain insight into the problem.