Page MenuHomeFreeBSD

libfetch: Add read buffering
Needs ReviewPublic

Authored by des on Sat, Jun 27, 2:30 PM.
Tags
None
Referenced Files
F161373551: D57907.id180942.diff
Fri, Jul 3, 5:59 AM
F161371715: D57907.id180929.diff
Fri, Jul 3, 5:44 AM
F161358962: D57907.diff
Fri, Jul 3, 3:32 AM
F161355193: D57907.diff
Fri, Jul 3, 2:50 AM
F161309817: D57907.id180942.diff
Thu, Jul 2, 4:11 PM
F161292205: D57907.id180929.diff
Thu, Jul 2, 12:24 PM
Unknown Object (File)
Thu, Jul 2, 2:44 AM
Unknown Object (File)
Thu, Jul 2, 2:44 AM
Subscribers

Details

Reviewers
bapt
Summary

Previously, we would read FTP control connection messages and HTTP
reponse headers one character at a time. Now, we read as much as will
fit in our buffer and look for a newline. If there is data left over,
it will be reused by the next fetch_getln() call. This also requires
the addition of a fetch_bufread() which takes the buffer into account,
otherwise the start of the HTTP response body will be stuck in the
buffer after we read the last line of the header.

This should noticeably improve HTTP performance, especially for small
transfers.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74328
Build 71211: arc lint + arc unit