Hi everyone,
I'm pleased to announce the release of version 1.1.4 of the buffered reader crate. It has been published on crates.io:
https://crates.io/crates/buffered-reader
You can also fetch it using the buffered-reader/v1.1.4 tag:
https://gitlab.com/sequoia-pgp/sequoia/-/tags/buffered-reader%2Fv1.1.4
which I signed:
$ git verify-tag buffered-reader/v1.1.4 gpg: Signature made Fri Jan 6 21:40:10 2023 GMT gpg: using RSA key C03FA6411B03AE12576461187223B56678E02528 gpg: Good signature from "Neal H. Walfield neal@walfield.org" gpg: "Neal H. Walfield neal@g10code.com" gpg: "Neal H. Walfield neal@gnupg.org" gpg: "Neal H. Walfield neal@pep-project.org" gpg: "Neal H. Walfield neal@pep.foundation" gpg: "Neal H. Walfield neal@sequoia-pgp.org"
This release fixes a performance bug in the generic buffered reader (`buffered_reader::Generic`). When the amount of data that is requested (e.g., via `BufferedReader::data`) exceeds the default buffer size, exactly that amount of data was read from the underlying reader. This is problematic for two reasons. First, as users of a buffered reader often do not immediately consume the data that is read, most reads are forwarded to the underlying buffered reader. Second, most reads are for one byte. Because `buffered_reader::Generic` keeps all data in a single vec, this resulted in a lot of copying, which hurt performance.
Neal on behalf of the whole Sequoia PGP team
announce@lists.sequoia-pgp.org