optimization(download): Consider using splice
on linux to download snapshots
#491
Labels
enhancement
New feature or request
splice
on linux to download snapshots
#491
Currently in
src/accountsdb/download.zig
, we're downloading snapshots to disk using a cross-platform but naive approach, where our client reads the HTTP response body into memory, and then we write that data to the resulting file. This can result in a lot of context switching, since we're reading from kernelspace into userspace, and then writing from userspace back to kernelspace.What we could instead do on linux is create a pipe, and
splice
the incoming response body through the pipe and then directly into the resulting file - this would avoid copying the data into userspace altogether.Closing this issue will entail:
The text was updated successfully, but these errors were encountered: