convert all git read/write functions to use ByteStrings
This yields a second or so speedup in unused, find, etc. Seems that even when the ByteString is immediately split and then converted to Strings, it's faster. I may try to push ByteStrings out into more of git-annex gradually, although I suspect most of the time-critical parts are already covered now, and many of the rest rely on libraries that only support Strings.
This commit is contained in:
parent
949ef94d5e
commit
7ff89ccfee
8 changed files with 49 additions and 94 deletions
|
@ -20,13 +20,11 @@ import Utility.SafeCommand
|
|||
|
||||
{- Scans for files that are checked into git at the specified locations. -}
|
||||
inRepo :: Repo -> [FilePath] -> IO [FilePath]
|
||||
inRepo repo l = pipeNullSplit repo $
|
||||
Params "ls-files --cached -z --" : map File l
|
||||
inRepo repo l = pipeNullSplit repo $ Params "ls-files --cached -z --" : map File l
|
||||
|
||||
{- Scans for files at the specified locations that are not checked into git. -}
|
||||
notInRepo :: Repo -> Bool -> [FilePath] -> IO [FilePath]
|
||||
notInRepo repo include_ignored l =
|
||||
pipeNullSplit repo $
|
||||
notInRepo repo include_ignored l = pipeNullSplit repo $
|
||||
[Params "ls-files --others"] ++ exclude ++
|
||||
[Params "-z --"] ++ map File l
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue