You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read ahead chunk body if previous chunk was small enough
Reading a chunk header then using the sendfile syscall to send the chunk
data is not optimal for small chunks, as it amounts to 2 system calls
for a small amount of bytes.
This commit uses the size of the last chunk to try to read the whole
chunk when the library reads the chunk header. If the last chunk data
size was under 4096 bytes, the library does not only read the chunk
header, but reads ahead to try to read the whole and thus to save the
sendfile call later.
This optimization should improve the read throughput for streams with
small chunks, e.g. streams with 1-message chunks.
0 commit comments