From 1928b828670d2a50081dd9bf8239a0de2b447804 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 9 Jan 2019 14:17:00 -0400 Subject: [PATCH] marginally faster VectorClock Builder show of a POSIXTime is 7-bit ascii, so no need to use the filesystem encoding on it --- Annex/VectorClock.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Annex/VectorClock.hs b/Annex/VectorClock.hs index e7ed501bd2..86cdd8e61c 100644 --- a/Annex/VectorClock.hs +++ b/Annex/VectorClock.hs @@ -18,7 +18,6 @@ import Prelude import Utility.Env import Utility.TimeStamp import Utility.QuickCheck -import Utility.FileSystemEncoding import qualified Data.Attoparsec.ByteString.Lazy as A -- | Some very old logs did not have any time stamp at all; @@ -46,7 +45,7 @@ formatVectorClock Unknown = "0" formatVectorClock (VectorClock t) = show t buildVectorClock :: VectorClock -> Builder -buildVectorClock = byteString . encodeBS' . formatVectorClock +buildVectorClock = string7 . formatVectorClock parseVectorClock :: String -> Maybe VectorClock parseVectorClock t = VectorClock <$> parsePOSIXTime t