From ff3644ad38d210c5ce0ebfb5a2cf5e84bb3b47da Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Mar 2012 17:15:58 -0400 Subject: status: Fixed to run in nearly constant space. Before, it leaked space due to caching lists of keys. Now all necessary data about keys is calculated as they stream in. The "nearly constant" is due to getKeysPresent, which builds up a lot of [] thunks as it traverses .git/annex/objects/. Will deal with it later. --- Annex/Content.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Annex/Content.hs') diff --git a/Annex/Content.hs b/Annex/Content.hs index fdd03f320..bf5a6c3a7 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -300,7 +300,7 @@ getKeysPresent' dir = do -- 2 levels of hashing levela <- dirContents dir levelb <- mapM dirContents levela - contents <- mapM dirContents (concat levelb) + contents <- unsafeInterleaveIO $ mapM dirContents (concat levelb) let files = concat contents return $ mapMaybe (fileKey . takeFileName) files -- cgit v1.2.3