diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-03-30 20:47:13 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-04-19 01:13:09 +0200 |
commit | 9224ce3d4d1ea0428a70e75134998e08aa45b1e6 (patch) | |
tree | a4afde96f9fd0fe9e1a3d14339f6e7146aeb59d3 /methods/server.h | |
parent | 76cbc9abb2d09ee5b248dfaa24948ba016fb6dee (diff) |
calculate only expected hashes in methods
Methods get told which hashes are expected by the acquire system, which
means we can use this list to restrict what we calculate in the methods
as any extra we are calculating is wasted effort as we can't compare it
with anything anyway.
Adding support for a new hash algorithm is therefore 'free' now and if a
algorithm is no longer provided in a repository for a file, we
automatically stop calculating it.
In practice this results in a speed-up in Debian as we don't have SHA512
here (so far), so we practically stop calculating it.
Diffstat (limited to 'methods/server.h')
-rw-r--r-- | methods/server.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/methods/server.h b/methods/server.h index b974ec89a..45622dd34 100644 --- a/methods/server.h +++ b/methods/server.h @@ -85,7 +85,7 @@ struct ServerState virtual bool Open() = 0; virtual bool IsOpen() = 0; virtual bool Close() = 0; - virtual bool InitHashes(FileFd &File) = 0; + virtual bool InitHashes(FileFd &File, HashStringList const &ExpectedHashes) = 0; virtual Hashes * GetHashes() = 0; virtual bool Die(FileFd &File) = 0; virtual bool Flush(FileFd * const File) = 0; |