summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command/Unused.hs5
-rw-r--r--debian/changelog1
-rw-r--r--doc/todo/git-annex_unused_eats_memory.mdwn6
3 files changed, 5 insertions, 7 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index e7065b3c3..27f5af1b4 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -5,6 +5,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE BangPatterns #-}
+
module Command.Unused where
import Control.Monad (filterM, unless, forM_)
@@ -80,7 +82,8 @@ checkRemoteUnused' r = do
where
isthere k = do
us <- keyLocations k
- return $ uuid `elem` us
+ let !there = uuid `elem` us
+ return there
uuid = Remote.uuid r
writeUnusedFile :: FilePath -> [(Int, Key)] -> Annex ()
diff --git a/debian/changelog b/debian/changelog
index c8c60579e..4ee0b80f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ git-annex (3.20110820) UNRELEASED; urgency=low
* The wget command will now be used in preference to curl, if available.
* init: Make description an optional parameter.
* unused, status: Sped up by avoiding unnecessary stats of annexed files.
+ * unused --remote: Reduced memory use to 1/4th what was used before.
-- Joey Hess <joeyh@debian.org> Tue, 23 Aug 2011 13:41:01 -0400
diff --git a/doc/todo/git-annex_unused_eats_memory.mdwn b/doc/todo/git-annex_unused_eats_memory.mdwn
index 6ce714004..fcb09a1af 100644
--- a/doc/todo/git-annex_unused_eats_memory.mdwn
+++ b/doc/todo/git-annex_unused_eats_memory.mdwn
@@ -17,9 +17,3 @@ currently present in the repository (possibly using a bloom filter again),
and that would yield a shortlist of keys that are probably not used.
Then scan thru all files in the repo to make sure that none point to keys
on the shortlist.
-
-----
-
-`git annex unused --from remote` is much worse, using hundreds of mb of
-memory. It has not been profiled at all yet, and can probably be improved
-somewhat by fixing whatever memory leak it (probably) has.