[xmonad] Issue 179 in xmonad: Tabbed Layout does not scale for >50 windows

codesite-noreply at google.com codesite-noreply at google.com
Wed Apr 30 09:41:21 EDT 2008


Issue 179: Tabbed Layout does not scale for >50 windows
http://code.google.com/p/xmonad/issues/detail?id=179

Comment #3 by andrea.rossato:
While I wonder how long it took to the xmonad algorithm complexity
calculation team to lay out the math their O notated conclusions are
based on (actually I'd really love to see that math too), still I'm
sure the decoration module rewrite group formed within the xmonad
developer team is going to take ages, literally, to reach an agreement
with the tabbed module maintaining team on how to prototype a new
decoration algorithm, given the constrains set out by the ACC team.

Which is unfortunate for the casual xmonad user who needs to open
50-100 windows on the same workspace, quite typical for this kind of
geek.

Sadly I cannot be of any help. Still I was a bit amazed by the fact
that iterating over such a short list of integers could lead to such a
slow down - and even though I'm running a version of tabbed which has
not been bloated with all the bottom, top, always, sometimes code,
still I can reproduce your problem.

So I decided to spend half an hour and did some math too. You know,
not that scientifically sounded kind of proof a real haskeller would
be able to do, but just some stupid old fashioned debugging, something
even a LUA coder would be able to do:

1. I created a simple function to print out the time, with
picoseconds (requires System.Time and System.IO):

printNow :: String -> X ()
printNow s = do
  t <- io (toCalendarTime =<< getClockTime)
   io $ hPutStrLn stderr $ s ++ " - " ++ show (ctSec t) ++ "." ++ show 
(ctPicosec t)

2. Then I wrote a small layout modifier:

data Debug a = Debug String deriving (Show, Read)
instance LayoutModifier Debug Window where
    redoLayout (Debug s) _ _ wrs = do
      printNow s
      return (wrs, Nothing)

3. In .xmonad/xmonad.hs I wrote:

main = xmonad defaultConfig {layoutHook = ModifiedLayout 
(Debug "tabbed") myTab }
myTab = decoration shrinkText defaultTheme Tabbed (ModifiedLayout (Debug "Simplest")
Simplest)

I also called printNow at the very end of XMonad.Operations.windows.

So we print the time:
a. right after Simplest returned
b. right after myTab returned
c. at the end of the windows call.

below there are the numbers of a few runs with enough tabs to slow
everything down.

I don't know if they are meaningful, this is why I'm posting them
here. If they indeed are, then they are also a bit puzzling. If
someone comes up with an idea on how to isolate the problem, please
drop me a line.

Historically I can say that from 0.4 up to 0.6 no changes have been
made to tabbed and related code. The text size calculation code has
been there from the very beginning of a tabbed layout (0.3 for sure)
without changes.

Anyway I think there's room for further investigation before calling
for a rewrite (a tabbed layout with O(n) is something I'd really like
to read, but I don't know if in that far future I'll still remember
how to read Haskell).

The numbers:

Simplest   - 57.187047000000
tabbed     - 57.272167000000
Operations - 57.356136000000

Simplest   - 57.356837000000
tabbed     - 57.422710000000
Operations - 57.523055000000

Simplest   - 57.523762000000
tabbed     - 57.599250000000
Operations - 57.686736000000

Simplest   - 59.65497000000
tabbed     - 59.119980000000
Operations - 59.141826000000

Simplest   - 1.672190000000
tabbed     - 1.723279000000
Operations - 1.745065000000

Simplest   - 3.152586000000
tabbed     - 3.205879000000
Operations - 3.227333000000

Simplest   - 5.839898000000
tabbed     - 5.889285000000
Operations - 5.913992000000

Simplest   - 5.914665000000
tabbed     - 5.969013000000
Operations - 6.12130000000

Simplest   - 6.12793000000
tabbed     - 6.67688000000
Operations - 6.97815000000

Simplest   - 6.98518000000
tabbed     - 6.225578000000
Operations - 6.263437000000

Simplest   - 6.264132000000
tabbed     - 6.319227000000
Operations - 6.356627000000

Simplest   - 6.357312000000
tabbed     - 6.411805000000
Operations - 6.451679000000

Simplest   - 7.712861000000
tabbed     - 7.763174000000
Operations - 7.805636000000

Simplest   - 7.806320000000
tabbed     - 7.860956000000
Operations - 7.905911000000

Simplest   - 7.906581000000
tabbed     - 7.962566000000
Operations - 8.23426000000

if you want more you know how to do it.




-- 
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the xmonad mailing list