build git trees using ContentIdentifier to speed up import
This gets the trees built, but it does not use them. Next step will be to remember the tree for next time an import is done, and diff between old and new trees to find the files that have changed. Added --missing to the mktree parameters. That only disables a check, so it's ok to do everywhere mktree is used. It probably also speeds up mktree to disable the check. Note that git fsck does not complain about the resulting tree objects that point to shas that are not in the repository. Even with --strict. A quick benchmark, importing 10000 files, this slowed it down from 2:04.06 to 2:04.28. So it will more than pay for itself. Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
parent
51319f8558
commit
7298123520
3 changed files with 124 additions and 69 deletions
|
@ -10,6 +10,7 @@
|
|||
module Utility.Hash (
|
||||
sha1,
|
||||
sha1_context,
|
||||
sha1s,
|
||||
sha2_224,
|
||||
sha2_224_context,
|
||||
sha2_256,
|
||||
|
@ -84,6 +85,9 @@ sha1 = hashlazy
|
|||
sha1_context :: Context SHA1
|
||||
sha1_context = hashInit
|
||||
|
||||
sha1s :: S.ByteString -> Digest SHA1
|
||||
sha1s = hash
|
||||
|
||||
sha2_224 :: L.ByteString -> Digest SHA224
|
||||
sha2_224 = hashlazy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue