From 5fbb5ece11246256fd947b78f89d512e37e47cf5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Apr 2013 14:30:54 -0400 Subject: more efficient data type for ChangeChan Making this a tset of lists of Changes, rather than a tset of Changes makes refilling it, in batch mode, much more efficient. Rather than needing to add every Change it's collected one at a time, it can add them in one fast batch operation. It would be more efficient yet to use a Set, but that would need an Eq instance for InodeCache. --- Assistant/Types/Changes.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Assistant/Types') diff --git a/Assistant/Types/Changes.hs b/Assistant/Types/Changes.hs index 9729acfbd..3b6e8501a 100644 --- a/Assistant/Types/Changes.hs +++ b/Assistant/Types/Changes.hs @@ -22,7 +22,7 @@ changeInfoKey (AddKeyChange k) = Just k changeInfoKey (LinkChange (Just k)) = Just k changeInfoKey _ = Nothing -type ChangeChan = TSet Change +type ChangeChan = TSet [Change] newChangeChan :: IO ChangeChan newChangeChan = atomically newTSet -- cgit v1.2.3