use filepath-bytestring for annex object manipulations
git-annex find is now RawFilePath end to end, no string conversions. So is git-annex get when it does not need to get anything. So this is a major milestone on optimisation. Benchmarks indicate around 30% speedup in both commands. Probably many other performance improvements. All or nearly all places where a file is statted use RawFilePath now.
This commit is contained in:
parent
bdec7fed9c
commit
c19211774f
53 changed files with 324 additions and 234 deletions
|
@ -13,13 +13,14 @@ import Types
|
|||
import Annex.Locations
|
||||
import Utility.Rsync
|
||||
import Utility.SafeCommand
|
||||
|
||||
import Data.Default
|
||||
import System.FilePath.Posix
|
||||
import Utility.FileSystemEncoding
|
||||
import Annex.DirHashes
|
||||
#ifdef mingw32_HOST_OS
|
||||
import Utility.Split
|
||||
#endif
|
||||
import Annex.DirHashes
|
||||
|
||||
import Data.Default
|
||||
import System.FilePath.Posix
|
||||
|
||||
type RsyncUrl = String
|
||||
|
||||
|
@ -42,7 +43,7 @@ mkRsyncUrl o f = rsyncUrl o </> rsyncEscape o f
|
|||
rsyncUrls :: RsyncOpts -> Key -> [RsyncUrl]
|
||||
rsyncUrls o k = map use dirHashes
|
||||
where
|
||||
use h = rsyncUrl o </> hash h </> rsyncEscape o (f </> f)
|
||||
use h = rsyncUrl o </> fromRawFilePath (hash h) </> rsyncEscape o (f </> f)
|
||||
f = keyFile k
|
||||
#ifndef mingw32_HOST_OS
|
||||
hash h = h def k
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue