When a client is accepted, currently we need to enter the event loop again in order to try to read some query from it. Later, when we read from the client, we need to wait for the next event loop call to send the reply to the socket.

It should be smarter than that: after we accept we should try to read from the client. After we execute a command, at least if the output buffer is zero-len, or small, we should try to write ASAP to the socket.