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:
parent
a01aa214be
commit
18f1fb5841
4 changed files with 40 additions and 37 deletions
|
@ -17,6 +17,7 @@ import qualified Command.Drop
|
|||
import Command
|
||||
import Annex.Wanted
|
||||
import Annex.SpecialRemote.Config
|
||||
import Annex.Content
|
||||
import qualified Database.Keys
|
||||
import Git.FilePath
|
||||
|
||||
|
@ -118,7 +119,8 @@ handleDropsFrom locs rs reason fromhere key afile preverified runner = do
|
|||
)
|
||||
|
||||
dropl fs n = checkdrop fs n Nothing $ \numcopies ->
|
||||
Command.Drop.startLocal afile ai numcopies key preverified
|
||||
stopUnless (inAnnex key) $
|
||||
Command.Drop.startLocal afile ai numcopies key preverified
|
||||
|
||||
dropr fs r n = checkdrop fs n (Just $ Remote.uuid r) $ \numcopies ->
|
||||
Command.Drop.startRemote afile ai numcopies key r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue