[pbs-devel] applied: [PATCH backup] use BufReader/Writer for Files passed to serde_json::from_reader/writer

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 6 16:41:02 CEST 2022


On 06.04.22 14:51, Wolfgang Bumiller wrote:
> As serde_json will otherwise read files 1 byte at a time.
> Writing is a bit better, but syntacitcal elements (quotes, braces,
> commas) still often show up as single write syscalls, so use BufWriter
> there as well.
> 
> Note that while we do store the file in the resulting objects, we do not
> need to keep the buffered read/writers as we always `seek` to the
> beginning on further file operations.
> 
> Reported-by: Mark Schouten <mark at tuxis.nl>
> Link: https://lists.proxmox.com/pipermail/pbs-devel/2022-April/004909.html
> Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
> ---
> @Mark: Hope the Reported-by tag is fine with you.
> 
>  proxmox-file-restore/src/block_driver_qemu.rs | 8 ++++----
>  src/config/tfa.rs                             | 6 +++---
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
>

applied, thanks!





More information about the pbs-devel mailing list