avoid borg list of archives that have been listed before

This makes sync a lot faster in the common case where there's no new
backup.

There's still room for it to be faster. Currently the old imported tree
has to be traversed, to generate the ImportableContents. Which then
gets turned around to generate the new imported tree, which is
identical. So, it would be possible to just return a "no new imports",
or an ImportableContents that has a way to graft in a tree. The latter
is probably too far to go to optimise this, unless other things need it.
The former might be worth it, but it's already pretty fast, since git
ls-tree is pretty fast.
This commit is contained in:
Joey Hess 2020-12-22 14:06:40 -04:00
parent 06ef1b7d68
commit 5d8e4a7c74
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 98 additions and 29 deletions

View file

@ -1,4 +1,4 @@
{- git-annex export log
{- git-annex export log (also used to log imports)
-
- Copyright 2017-2019 Joey Hess <id@joeyh.name>
-
@ -64,7 +64,6 @@ exportedTreeishes = nub . map exportedTreeish
incompleteExportedTreeishes :: [Exported] -> [Git.Ref]
incompleteExportedTreeishes = concatMap incompleteExportedTreeish
data ExportParticipants = ExportParticipants
{ exportFrom :: UUID
, exportTo :: UUID