Sped up unused.
Added Git.ByteString which replaces Git IO methods with ones using lazy ByteStrings. This can be more efficient when large quantities of data are being read from git. In Git.LsTree, parse git ls-tree output more efficiently, thanks to ByteString. This benchmarks 25% faster, in a benchmark that includes (probably predominately) the run time for git ls-tree itself. In real world numbers, this makes git annex unused 2 seconds faster for each branch it needs to check, in my usual large repo.
This commit is contained in:
parent
244ffef43f
commit
a91c8a15d5
4 changed files with 88 additions and 19 deletions
5
Git.hs
5
Git.hs
|
@ -59,6 +59,7 @@ module Git (
|
|||
getSha,
|
||||
shaSize,
|
||||
commit,
|
||||
assertLocal,
|
||||
|
||||
prop_idempotent_deencode
|
||||
) where
|
||||
|
@ -458,8 +459,8 @@ commit g message newref parentrefs = do
|
|||
ps = concatMap (\r -> ["-p", r]) parentrefs
|
||||
|
||||
{- Reads null terminated output of a git command (as enabled by the -z
|
||||
- parameter), and splits it into a list of files/lines/whatever. -}
|
||||
pipeNullSplit :: Repo -> [CommandParam] -> IO [FilePath]
|
||||
- parameter), and splits it. -}
|
||||
pipeNullSplit :: Repo -> [CommandParam] -> IO [String]
|
||||
pipeNullSplit repo params = filter (not . null) . split "\0" <$>
|
||||
pipeRead repo params
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue