cache the serialization of a Key
This will speed up the common case where a Key is deserialized from disk, but is then serialized to build eg, the path to the annex object. It means that every place a Key has any of its fields changed, the cache has to be dropped. I've grepped and found them all. But, it would be better to avoid that gotcha somehow..
This commit is contained in:
parent
918868915c
commit
4536c93bb2
9 changed files with 34 additions and 7 deletions
|
@ -23,6 +23,7 @@ data Key = Key
|
|||
, keyMtime :: Maybe EpochTime
|
||||
, keyChunkSize :: Maybe Integer
|
||||
, keyChunkNum :: Maybe Integer
|
||||
, keySerialization :: Maybe S.ByteString -- ^ cached serialization
|
||||
} deriving (Eq, Ord, Read, Show)
|
||||
|
||||
{- A filename may be associated with a Key. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue