HttpRequest: Don't wait for socket to be readable
The socket is a blocking one, which means Read() will block unless data is available, thus WaitForReadable() is useless in this context. Testing also shows a 2x performance increase from removing this call due to poll() performance being botched when KDEBUG_LEVEL >= 2. Change-Id: I3170f865e961112b420c1548726bb6fd38e94cb2 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3078 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
846c12f5df
commit
7bac04e684
@ -584,7 +584,6 @@ BHttpRequest::_MakeRequest()
|
||||
|
||||
while (!fQuit && !(receiveEnd && parseEnd)) {
|
||||
if ((!receiveEnd) && (fInputBuffer.Size() == previousBufferSize)) {
|
||||
fSocket->WaitForReadable();
|
||||
BStackOrHeapArray<char, 4096> chunk(kHttpBufferSize);
|
||||
bytesRead = fSocket->Read(chunk, kHttpBufferSize);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user