]> dgit.raspbian.org Git - git-annex.git/commit
separate handles for cat-file and cat-file --batch-check
authorJoey Hess <joeyh@joeyh.name>
Fri, 24 Sep 2021 17:16:13 +0000 (13:16 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 24 Sep 2021 17:16:13 +0000 (13:16 -0400)
commite47b4badb3bc40ef1b00bdbba1d629357c7d6384
tree8727928fd34ad894f4d5e1e2c33b5257e756bf48
parente6c0bbd6459e10a5efa4d997d2c6b5ba5f61d8cb
separate handles for cat-file and cat-file --batch-check

This avoids starting one process when only the other one is needed.
Eg in git-annex smudge --clean, this reduces the total number of
cat-file processes that are started from 4 to 2.

The only performance penalty is that when both are needed, it has to do
twice as much work to maintain the two Maps. But both are very small,
consisting of 1 or 2 items, so that work is negligible.

Sponsored-by: Dartmouth College's Datalad project
Annex/CatFile.hs
Git/CatFile.hs
Types/CatFileHandles.hs