drop performance improvements

Sped up seeking files to drop by 2x, and also some performance
improvements to checking numcopies.

Interestingly, the seek speedup is not due to precaching, but I think is
due to calling getParsed earlier.

Annex.Drop had to be changed to check inAnnex there, since it was removed
from Command.Drop. All other users of Command.Drop already checked inAnnex
themselves.

This commit was sponsored by Ryan Newton on Patreon.
This commit is contained in:
Joey Hess 2020-07-24 13:27:30 -04:00
parent a01aa214be
commit 18f1fb5841
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 40 additions and 37 deletions

View file

@ -33,11 +33,9 @@ and precache them.
> > > * `sync --content` 2x speedup!
> > > * `fsck --fast` 1.5x speedup
> > > * `whereis` 1.5x speedup
> > > * `copy --to --fast` twenty-five percent or so speedup
> > > * `copy --to` 2x speedup
> > > * `copy --from` 2x speedup
> > >
> > > For copy benchmarks, note that both repos had all files.
> > >
> > > move, copy, and drop probably are also faster, but the work will
> > > dominate
> > >
> > > [[done]]