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
|
@ -16,7 +16,7 @@ import Control.Applicative
|
|||
import System.Posix.Types
|
||||
import qualified Data.ByteString.Lazy.Char8 as L
|
||||
|
||||
import Git.ByteString
|
||||
import Git
|
||||
import Utility.SafeCommand
|
||||
|
||||
type Treeish = String
|
||||
|
@ -31,7 +31,7 @@ data TreeItem = TreeItem
|
|||
{- Lists the contents of a Treeish -}
|
||||
lsTree :: Repo -> Treeish -> IO [TreeItem]
|
||||
lsTree repo t = map parseLsTree <$>
|
||||
pipeNullSplit repo [Params "ls-tree --full-tree -z -r --", File t]
|
||||
pipeNullSplitB repo [Params "ls-tree --full-tree -z -r --", File t]
|
||||
|
||||
{- Parses a line of ls-tree output.
|
||||
- (The --long format is not currently supported.) -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue