
tomi:
Sat Mar 27 21:15:03 CET 2010 Tomas Janousek
* X.H.UrgencyHook: performance fix cleanupUrgents would update the Map in extensible state 2-times the number of visible windows, resulting in excessive memory usage and garbage collection. This seems to make it behave correctly.
Note: this is actually not necessary after the fix to core I just posted, but it should speed things up a little if one has hundreds of visible windows. -- Tomáš Janoušek, a.k.a. Liskni_si, http://work.lisk.in/
New patches:
[X.H.UrgencyHook: performance fix Tomas Janousek
**20100327201503 Ignore-this: e62c1cdc752c510f2fe1f7dc3bef3db5 cleanupUrgents would update the Map in extensible state 2-times the number of visible windows, resulting in excessive memory usage and garbage collection. This seems to make it behave correctly. ] { hunk ./XMonad/Hooks/UrgencyHook.hs 82 import Control.Applicative ((<$>)) import Control.Monad (when) import Data.Bits (testBit) -import Data.List (delete) +import Data.List (delete, (\\)) import Data.Maybe (listToMaybe, maybeToList) import qualified Data.Set as S
hunk ./XMonad/Hooks/UrgencyHook.hs 375 shouldSuppress sw w = elem w <$> suppressibleWindows sw
cleanupUrgents :: SuppressWhen -> X () -cleanupUrgents sw = mapM_ clearUrgency =<< suppressibleWindows sw +cleanupUrgents sw = do + sw' <- suppressibleWindows sw + adjustUrgents (\\ sw') >> adjustReminders (filter $ (not . (`elem` sw') . window))
Perhaps use notElem ? -- Don