diff options
author | Joey Hess <joeyh@joeyh.name> | 2019-01-14 16:33:20 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2019-01-14 16:37:28 -0400 |
commit | 4536c93bb2ecf114ab711beac33fa358facd6985 (patch) | |
tree | f14d3b7d9224d4979be87c5e8ba52983da359a02 /Types | |
parent | 918868915c2859d2f8d68afaa222d92143ec64f2 (diff) |
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..
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Key.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Types/Key.hs b/Types/Key.hs index df0e042606..97d548ff78 100644 --- a/Types/Key.hs +++ b/Types/Key.hs @@ -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. -} |