Commit graph

3433 commits

Author SHA1 Message Date
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
a13949bf37 fix link 2012-03-11 11:52:26 -04:00
Joey Hess
f2e4187323 fix link 2012-03-11 11:52:02 -04:00
Joey Hess
8e4c66781f Merge branch 'master' of ssh://git-annex.branchable.com 2012-03-11 11:51:33 -04:00
http://joey.kitenet.net/
c90e4fdb66 Added a comment 2012-03-11 15:50:11 +00:00
http://claimid.com/FooBarWidget
43dff01dff 2012-03-11 09:22:58 +00:00
Joey Hess
94d7b323ee remove cruft 2012-03-10 23:02:17 -04:00
Joey Hess
997e29f294 sync: Sync to lower cost remotes first.
This has two benefits.

1. When a lot of refs are going to be received, get them via lower cost
   connection when possible.
2. Allows ctrl-c of sync after the cheaper remotes have been pulled from
   (or pushed to).
2012-03-10 15:37:38 -04:00
Joey Hess
5ab82230f7 fsck: Fix up any broken links and misplaced content caused by the directory hash calculation bug fixed in the last release. 2012-03-10 14:46:21 -04:00
Joey Hess
468fecc315 Setup.hs: import configure
Rather than running make, which runs configure, let Setup.hs just include
the configure code. The standalone configure is retained for use by the
Makefile.

This may work better with cabal-dev, since it avoids the Makefile running
ghc, and lets cabal handle all the compiler running, with whatever
flags it uses to expose dependencies.
2012-03-10 14:00:26 -04:00
Joey Hess
eaa80be917 move text dependency into same block with the other dependencies 2012-03-10 14:00:06 -04:00
Joey Hess
13598d9432 add other-modules for hsc files 2012-03-10 12:47:57 -04:00
Joey Hess
f9d44cccd9 perhaps more clear type 2012-03-10 11:38:38 -04:00
Joey Hess
10d9315b59 cleanup 2012-03-09 20:43:50 -04:00
Joey Hess
41c0d9e969 add news item for git-annex 3.20120309 2012-03-09 20:15:29 -04:00
Joey Hess
433b5fe59e releasing version 3.20120309 2012-03-09 20:14:34 -04:00
Joey Hess
bca3fd65b9 fix key directory hash calculation code
Fix Key directory hash calculation code to behave as it did before version
3.20120227 when a key contains non-ascii.

The hash directories for a given Key are based on its md5sum.
Prior to ghc 7.4, Keys contained raw, undecoded bytes, so the md5sum was
taken of each byte in turn. With the ghc 7.4 filename encoding change,
keys contains decoded unicode characters (possibly with surrigates for
undecodable bytes). This changes the result of the md5sum, since the md5sum
used is pure haskell and supports unicode. And that won't do, as git-annex
will start looking in a different hash directory for the content of a key.

The surrigates are particularly bad, since that's essentially a ghc
implementation detail, so could change again at any time. Also, changing
the locale changes how the bytes are decoded, which can also change
the md5sum.

Symptoms would include things like:

* git annex fsck would complain that no copies existed of a file,
  despite its symlink pointing to the content that was locally present
* git annex fix would change the symlink to use the wrong hash
  directory.

Only WORM backend is likely to have been affected, since only it tends
to include much filename data (SHA1E could in theory also be affected).

I have not tried to support the hash directories used by git-annex versions
3.20120227 to 3.20120308, so things added with those versions with WORM
will require manual fixups. Sorry for the inconvenience!
2012-03-09 20:03:51 -04:00
Joey Hess
d6e77595ba factor out Utility.FileSystemEncoding 2012-03-09 19:08:10 -04:00
Joey Hess
789254747b refactor 2012-03-09 18:52:03 -04:00
Joey Hess
581dc819e1 version base dependency for ghc 7.4 2012-03-06 17:32:18 -04:00
Joey Hess
dc9049373e cleanup 2012-03-06 14:12:15 -04:00
Joey Hess
d08ee1a9d2 syscall optimisation 2012-03-06 13:56:20 -04:00
Joey Hess
cd6fd4a1d1 Merge branch 'master' of ssh://git-annex.branchable.com 2012-03-06 13:23:32 -04:00
http://joey.kitenet.net/
a78f699190 Added a comment 2012-03-06 17:22:54 +00:00
Joey Hess
b927dfd970 remove addurl test
addurl --fast used to avoid network, but it always uses it now, getting at
least size. Thus not appropriate for test suite without a lot of work.
2012-03-06 13:21:46 -04:00
https://www.google.com/accounts/o8/id?id=AItOawk_LOahrm_Cdg7io-_H0CNKkaxsRRQgRFo
ca936cd2d8 Added a comment: Test suite failure 2012-03-06 11:20:36 +00:00
http://peter-simons.myopenid.com/
b4b36b6ebe Added a comment 2012-03-05 23:29:42 +00:00
http://joey.kitenet.net/
d2835d4304 Added a comment 2012-03-05 21:32:00 +00:00
http://joey.kitenet.net/
614208ad52 removed 2012-03-05 21:30:08 +00:00
http://joey.kitenet.net/
eedc774c8a Added a comment 2012-03-05 21:29:46 +00:00
http://peter-simons.myopenid.com/
6a1e334a78 Added a comment 2012-03-05 21:10:48 +00:00
Joey Hess
ee806c1175 add news item for git-annex 3.20120230 2012-03-05 13:47:35 -04:00
Joey Hess
0d41899304 releasing version 3.20120230 2012-03-05 13:47:20 -04:00
Joey Hess
51338486dc Fix a bug in symlink calculation code, that triggered in rare cases where an annexed file is in a subdirectory that nearly matched to the .git/annex/object/xx/yy subdirectories.
This is a straight up pure-code stinker. The relative path calculation
looked for common subdirectories in the two paths, but failed to stop
after the paths diverged. When a later pair of subdirectories were the
same, the resulting relative path was wrong.

Added regression test for this.
2012-03-05 12:42:52 -04:00
Joey Hess
52e88f3ebf add remote start and stop hooks
Locking is used, so that, if there are multiple git-annex processes
using a remote concurrently, the stop hook is only run by the last
process that uses it.
2012-03-04 19:12:58 -04:00
Joey Hess
fba66c55ed foo 2012-03-04 13:16:35 -04:00
Joey Hess
3960825cef better chunked file retrieval
Avoids opening every chunk at once, instead streaming them in.

Not done for encrypted file retrieval yet.
2012-03-04 11:48:23 -04:00
Joey Hess
612ca3cf2e tweak davfs2 settings 2012-03-04 11:12:52 -04:00
Joey Hess
896fce3847 box.com seems to behave better with smaller chunks
Seeing some weird failures in the davfs2 or box.com layer with 100 mb
chunks.
2012-03-04 11:02:41 -04:00
Joey Hess
013c7ea441 clarification 2012-03-04 10:51:25 -04:00
Joey Hess
89cc2d128f make meter slightly wider 2012-03-04 10:49:28 -04:00
Joey Hess
7ba79cfb8c thread through original key to retrieveEnctypted
Allows showing progress bar for this last case of the directory special
remote.
2012-03-04 03:36:39 -04:00
Joey Hess
4638314001 add progress display when receiving files
That was actually really easy. But, when getting a file from an encrypted
directory special remote, no meter can be shown, because the total file
size is not known.
2012-03-04 03:25:41 -04:00
Joey Hess
9856c24a59 Add progress bar display to the directory special remote.
So far I've only written progress bars for sending files, not yet
receiving.

No longer uses external cp at all. ByteString IO is fast enough.
2012-03-04 03:17:25 -04:00
Joey Hess
8fc533643d instructions for using Box.com as a special remote
I was sucked in by the 50 gb free lifetime storage offer.
Happily, it was pretty easy to get it to work with git-annex.
2012-03-04 00:14:42 -04:00
Joey Hess
50c897c082 tweak 2012-03-03 20:02:48 -04:00
Joey Hess
3436aba6de Directory special remotes now support chunking files written to them
Avoiding writing files larger than a specified size is useful on certian
things. For example, box.com has a file size limit of 100 mb. Could also
be useful on really crappy removable media.
2012-03-03 18:05:55 -04:00
Joey Hess
2841d748a4 Merge branch 'master' of ssh://git-annex.branchable.com 2012-03-01 22:40:24 -04:00
Joey Hess
1098bc37ab "here" can be used to refer to the current repository, which can read better than the old "." (which still works too). 2012-03-01 22:35:10 -04:00
http://joey.kitenet.net/
98747ae86b Added a comment 2012-02-29 22:54:01 +00:00