serialization: 'read-byte-string' makes a single read(2) call.
authorLudovic Courtès <ludo@gnu.org>
Fri, 24 Jan 2020 21:39:47 +0000 (22:39 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 24 Jan 2020 22:56:43 +0000 (23:56 +0100)
commit01e5d63c87b6b110f0632597e89a6a7476fc7d1c
treeb8fbe04b4bd36eee94cd802ddc401aa94b3b185b
parent09238d618a511de80de189ff3ff18bfa0f280bb9
serialization: 'read-byte-string' makes a single read(2) call.

On "guix build libreoffice -nd", this reduces the number of read(2)
system calls from 10,434 to 8092.

* guix/serialization.scm (sub-bytevector): New procedure.
(read-byte-string): Make a single 'get-bytevector-n*' call and use
'sub-bytevector'.
guix/serialization.scm