Hi,

I'm looking at the endpoint code a lot in preparation for ports to 8.5.

I noticed the write(Non)BlockingDirect methods in particular as they had a
fixme which wondered about the buffering strategy. Given the use, the
thinking seems very legacy optimization oriented, because:
- If the socket buffer is configured as direct, then it is a good idea to
always use it
- The async API is a better API for "direct" writes (where the caller owns
the buffer that is ultimately written to the socket or the SSL engine) with
a clearer contract
- HTTP/2 and websocket don't use them anymore by default, and sendfile also
bypasses them

I have not made a performance study but it's fairly certain the benefit is
zero. As a result, I'm considering removing them (quick experiment: no
particular problem with the testsuite).

Rémy

Reply via email to