[Libguestfs] [libnbd PATCH] python: Speed up pread

Eric Blake eblake at redhat.com
Tue May 31 12:01:12 UTC 2022


On Sat, May 28, 2022 at 06:16:21PM +0100, Richard W.M. Jones wrote:
> On Fri, May 27, 2022 at 04:44:16PM -0500, Eric Blake wrote:
> > Instead of malloc'ing a C buffer, nbd_pread()ing into it, then copying
> > it into an immutable Python bytes object, we can instead pre-create a
> > correctly-sized Python bytearray object, then nbd_pread() directly
> > into that object's underlying bytes.
> > 
> Looks good,
> 
> Reviewed-by: Richard W.M. Jones <rjones at redhat.com>

Pushed as f8c76c0

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


More information about the Libguestfs mailing list