summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-21 18:46:39 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-21 18:49:25 -0400
commit7c3f0eae77b07ccc65c4e30d9eb1288781bd0c02 (patch)
treeaf6b86482c4f67f710349677a48917ac29fa404f /doc
parentd71baf07108c4903c444175ca482af1ed4cca1b4 (diff)
benchmarked numcopies .gitattributes in preferred content
Checking .gitattributes adds a full minute to a git annex find looking for files that don't have enough copies. 2:25 increasts to 3:27. I feel this is too much of a slowdown to justify making it the default. So, exposed two versions of the preferred content expression, a slow one and a fast but approximate one. I'm using the approximate one in the default preferred content expressions to avoid slowing down the assistant.
Diffstat (limited to 'doc')
-rw-r--r--doc/git-annex.mdwn10
-rw-r--r--doc/preferred_content.mdwn8
-rw-r--r--doc/todo/preferred_content_numcopies_check.mdwn4
3 files changed, 13 insertions, 9 deletions
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index 6e7a6ed55..279fa24dd 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -1022,14 +1022,16 @@ file contents are present at either of two repositories.
copies, on remotes in the specified group. For example,
`--copies=archive:2`
-* `--numcopiesneeded=number`
+* `--lackingcopies=number`
Matches only files that git-annex believes need the specified number or
more additional copies to be made in order to satisfy their numcopies
- setting, as configured by the global numcopies setting of the repository.
+ settings.
- Note that for various reasons, including speed, this does not look
- at the annex.numcopies .gitattributes settings of files.
+* `--approxlackingcopies=number`
+
+ Like lackingcopies, but does not look at .gitattributes annex.numcopies
+ settings. This makes it significantly faster.
* `--inbackend=name`
diff --git a/doc/preferred_content.mdwn b/doc/preferred_content.mdwn
index b18f46c33..039df3878 100644
--- a/doc/preferred_content.mdwn
+++ b/doc/preferred_content.mdwn
@@ -113,7 +113,7 @@ any repository that can will back it up.)
All content is preferred, unless it's for a file in a "archive" directory,
which has reached an archive repository.
-`((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1))) or numcopiesneeded=1`
+`((exclude=*/archive/* and exclude=archive/*) or (not (copies=archive:1 or copies=smallarchive:1))) or roughlylackingcopies=1`
### transfer
@@ -147,20 +147,20 @@ All content is preferred.
Only prefers content that's not already backed up to another backup
or incremental backup repository.
-`(include=* and (not copies=backup:1) and (not copies=incrementalbackup:1)) or numcopiesneeded=1`
+`(include=* and (not copies=backup:1) and (not copies=incrementalbackup:1)) or approxlackingcopies=1`
### small archive
Only prefers content that's located in an "archive" directory, and
only if it's not already been archived somewhere else.
-`((include=*/archive/* or include=archive/*) and not (copies=archive:1 or copies=smallarchive:1)) or numcopiesneeded=1`
+`((include=*/archive/* or include=archive/*) and not (copies=archive:1 or copies=smallarchive:1)) or approxlackingcopies=1`
### full archive
All content is preferred, unless it's already been archived somewhere else.
-`(not (copies=archive:1 or copies=smallarchive:1)) or numcopiesneeded=1`
+`(not (copies=archive:1 or copies=smallarchive:1)) or approxlackingcopies=1`
Note that if you want to archive multiple copies (not a bad idea!),
you should instead configure all your archive repositories with a
diff --git a/doc/todo/preferred_content_numcopies_check.mdwn b/doc/todo/preferred_content_numcopies_check.mdwn
index 8aa736a04..2e007460f 100644
--- a/doc/todo/preferred_content_numcopies_check.mdwn
+++ b/doc/todo/preferred_content_numcopies_check.mdwn
@@ -59,7 +59,9 @@ Conclusion:
to instead end with "or numcopiesneeded=1" **done**
* See if "numcopiesneeded=N" can check .gitattributes without getting
a lot slower. If now, perhaps add a "numcopiesneededaccurate=N" that
- checks it.
+ checks it. **done**
+
+[[done]]
## Stability analysis