codehenry / xmonad

Automatically exported from code.google.com/p/xmonad
0 stars 0 forks source link

Tabbed layout with long window title makes XMonad very slow #377

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Switch to a tabbed layout
2. Point a browser to http://tutorial.happstack.com/src/ControllerBasic.hs

Reproducible with both Firefox and Chromium.

Upon navigating to the above URL XMonad uses 100% CPU for multiple seconds.
This makes the system and XMonad in particular very unresponsive.

This is very likely caused by an extremely long window title. The mentioned
URL uses the entire source code of ControllerBasic.hs as the title of the
page (which is probably a bug in itself). This title consists of 8340
characters. The browser then uses the page title as the window title which
in turn is passed on to XMonad.

What is the expected output? What do you see instead?
I expect XMonad to not spend significantly more time on windows with a long
title then on windows with a short title. On my system it takes over 5
seconds. This happens every time I change the layout to tabbed or switch
the focus or workspace to one containing the evil window. It happens ONLY
with tabbed layout.

I created some dummy HTML files with titles of increasing length. The
slowdown becomes apparent with titles over 1000 characters. The slowdown
appears to be more than linear in terms of the window title length.

The attached files test3, test4 and test5.html have title lengths of 500,
1000 and 2000 characters. Try viewing test5.html in a browser in tabbed
layout and then switching between that window and another innocent one
(terminal?) with [WIN]+[TAB] a few times to notice the problem.

What version of the product are you using? On what operating system?
xmonad-0.9.1

> uname -a
Linux pcroel 2.6.31-gentoo-r10 #1 PREEMPT Tue Feb 23 12:46:16 CET 2010 i686
Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux

A simple workaround might be truncating window titles to a maximum of a few
hundred characters.

Original issue reported on code.google.com by vandijk....@gmail.com on 1 Mar 2010 at 9:39

Attachments:

GoogleCodeExporter commented 8 years ago
The following comment seems highly relevant:

http://code.google.com/p/xmonad/issues/detail?id=179#c2

Original comment by vandijk....@gmail.com on 1 Mar 2010 at 9:41