Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] NIO inefficiency?

Hi Simone,

On Friday, August 9, 2013 at 3:08 PM, Simone Bordet wrote:

No.
I just checked 9.1, and we don't call
java.nio.channels.SocketChannel.write() if the buffer is empty.

Wouldn't the following in HttpOutput.close do a write w/ empty buffer explicitly?
 
if (BufferUtil.hasContent(_aggregate))
    _channel.write(_aggregate, !_channel.getResponse().isIncluding());
else
    _channel.write(BufferUtil.EMPTY_BUFFER, !_channel.getResponse().isIncluding());

Thanks,
  Viktor

Back to the top