Commit graph

7 commits

Author SHA1 Message Date
Joey Hess
59e2feeda1 Merge branch 'master' into bloom
Conflicts:
	doc/todo/git-annex_unused_eats_memory.mdwn
2012-03-12 16:33:16 -04:00
Joey Hess
6a95240dff note fixed 2012-03-12 16:32:54 -04:00
Joey Hess
8540183a02 close 2012-03-12 16:31:41 -04:00
Joey Hess
b086e32c63 unused: Reduce memory usage significantly.
Much of the memory bloat turned out to be due to getKeysReferenced
containing a mapM, which is strict and buffered the whole list
rather than streaming it.

The other half of the bloat was due to building a temporary Set
in order to call S.difference. While that is more cpu efficient,
I switched to successive S.delete, since with it, I can run a whole
git annex unused in less than 8 mb of memory.

The whole Set of keys with content available is still stored in memory,
so running unused in a repo with a whole lot of file content will still
use more memory. In a repo containing 6000 files, it needed 40 mb.

Note that the status command still uses the bloatful getKeysReferenced.
2012-03-11 16:24:07 -04:00
Joey Hess
05b7608113 update 2011-11-08 01:27:06 -04:00
Joey Hess
f600444ab6 unused --remote: Reduced memory use to 1/4th what was used before.
Using a single strictness annotation, in just the right place.
Tried several others, none of which helped and some of which potentially
hurt. This is only the second time I've really had to deal with this in
a year of using haskell, which is, I suppose not that bad.
2011-08-31 19:13:02 -04:00
Joey Hess
4ea0b7c288 add 2011-04-07 14:45:10 -04:00