diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-15 16:19:53 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2011-12-15 16:19:53 +0000 |
commit | 5a1b9ed0aa3a0c240b667dbe504b61b2b68e4d16 (patch) | |
tree | c55e8148f4aca9cc12294b33bdd052ae3934a71b /src/libstore/references.cc | |
parent | a67b8ae22450a0fe10698042b452f5f2f322e008 (diff) | |
download | guix-5a1b9ed0aa3a0c240b667dbe504b61b2b68e4d16.tar.gz |
* Refactoring: move sink/source buffering into separate classes.
* Buffer the HashSink. This speeds up hashing a bit because it prevents lots of calls to the hash update functions (e.g. nix-hash went from 9.3s to 8.7s of user time on the closure of my /var/run/current-system).
Diffstat (limited to 'src/libstore/references.cc')
-rw-r--r-- | src/libstore/references.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/references.cc b/src/libstore/references.cc index ade9c9aa20..c1f9e3ba77 100644 --- a/src/libstore/references.cc +++ b/src/libstore/references.cc @@ -57,11 +57,11 @@ struct RefScanSink : Sink RefScanSink() : hashSink(htSHA256) { } - void operator () (const unsigned char * data, unsigned int len); + void operator () (const unsigned char * data, size_t len); }; -void RefScanSink::operator () (const unsigned char * data, unsigned int len) +void RefScanSink::operator () (const unsigned char * data, size_t len) { hashSink(data, len); |