diff options
author | Joey Hess <joey@kitenet.net> | 2012-03-11 17:15:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-03-11 17:15:58 -0400 |
commit | ff3644ad38d210c5ce0ebfb5a2cf5e84bb3b47da (patch) | |
tree | 8c9638d417204ad7dc2a0b3c0406dd631a0e51a1 /Annex/Content.hs | |
parent | b086e32c63a4932fc5916bedae7abe0690da4eb0 (diff) |
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.
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r-- | Annex/Content.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |