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
Enhancement Description HttpReceiverOverHTTP has a rather complex, re-entrant, logic that can be improved, likely with impacts to HttpReceiver and therefore other transports.
In particular:
If it is known that there is no content (Content-Length: 0, HEAD requests, 204 No Content responses), we should skip allocating the Content.Source and notifying Response.ContentSourceListener.
This could affect all the transports, and for HTTP/2 and HTTP/3 is even simpler: there is no content of HeadersFrame.last=true.
HttpReceiverOverHTTP could optimize the number of syscalls to read() and NIO, as currently it performs at least 1 extra syscall to read zero from the network.
This needs to be carefully analyzed, because responseSuccess() may trigger the send of a queued request, and an attempt to read in receiveNext() may read the response of the queued request that was just sent.
Is it worth to try to read the next response, costing a buffer acquire, network read, and NIO read interest, versus just skipping the read and going directly to NIO read interest?
The text was updated successfully, but these errors were encountered:
Jetty version(s)
12.1.x
Enhancement Description
HttpReceiverOverHTTP
has a rather complex, re-entrant, logic that can be improved, likely with impacts toHttpReceiver
and therefore other transports.In particular:
Content-Length: 0
,HEAD
requests,204 No Content
responses), we should skip allocating theContent.Source
and notifyingResponse.ContentSourceListener
.This could affect all the transports, and for HTTP/2 and HTTP/3 is even simpler: there is no content of
HeadersFrame.last=true
.HttpReceiverOverHTTP
could optimize the number of syscalls toread()
and NIO, as currently it performs at least 1 extra syscall to read zero from the network.This needs to be carefully analyzed, because
responseSuccess()
may trigger the send of a queued request, and an attempt to read inreceiveNext()
may read the response of the queued request that was just sent.Is it worth to try to read the next response, costing a buffer acquire, network read, and NIO read interest, versus just skipping the read and going directly to NIO read interest?
The text was updated successfully, but these errors were encountered: