[xmonad] Delays in focus update...
nzeh at cs.dal.ca
Tue Feb 7 00:24:14 CET 2012
Brandon Allbery [2012.02.06 1744 -0500]:
> On Mon, Feb 6, 2012 at 17:31, Norbert Zeh <nzeh at cs.dal.ca> wrote:
> Allen S. Rout [2012.02.06 1453 -0500]:
> > But I've noticed a certain lack of responsiveness when I make
> > sweeping motions with the mouse, and I've now done a bit of an
> > experiment that seems to narrow it down.
> I am not entirely certain what inside the decoration module would create
> massive delays - the CPU usage on one of my cores goes up to 50% when I'm
> in the
> endless loop. I'm not too keen to dig into it because this module is a
> but it may simply be necessary.
> Two things that come to mind are that
> (a) decoration windows are, somewhat uselessly, part of the StackSet and must
> be traversed whenever the StackSet is searched for the newly focused window;
I had one brief look at the decoration code and decided that I do not want to
understand it. Maybe it's time to reevaluate this decision. Making these
windows part of the stackset is certainly completely wrong. It's equivalent to
having the frame X window of a reparenting window manager show up in the window
list. However, adding them to the stack should only cause a factor 2 slowdown,
while the slowdown I experience is more a factor 10+.
> (b) Decoration registers interest in all events on decoration windows,
> specifically including mouse events IIRC, and (usually pointlessly) invokes a
> (usually stub) handler on such events.
This sounds more like the real culprit.
> BTW, the tabs module really needs to be rewritten not to use Decoration; not
> only is Decoration inefficient, as above, but tabs are actually a rather poor
> fit for Decoration because most of the Decoration code assumes decoration
> windows take up space near the real window, and odd things happen with respect
> to space allocation when they are instead located somewhere else. (I have
> local hacks around that which fix most of the odd things with respect to
> figuring out the available workspace area, but not all of them; and it still
> leaves the performance issues.)
I am actually using decoration to add "title bars" above my windows. So, while
separating the decoration and tab modules may be a good idea due to the reasons
you cite, it wouldn't help fix the performance issues for people (like myself)
who actually do use decoration as it was meant to be used.
Bottom line: someone will have to look at that decoration code, maybe I when I
find the time, but I'd be happy if someone else beat me to it ;)
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the xmonad