Using direct buffers for reads, to avoid copy of the bytes by the

JDK, and because they yield better performance for masking.
This commit is contained in:
Simone Bordet 2013-08-19 22:11:40 +02:00
parent ad8db51ed5
commit 1c73ce674f
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp
{
LOG.debug("{} onFillable()",policy.getBehavior());
stats.countOnFillableEvents.incrementAndGet();
ByteBuffer buffer = bufferPool.acquire(getInputBufferSize(),false);
ByteBuffer buffer = bufferPool.acquire(getInputBufferSize(),true);
BufferUtil.clear(buffer);
boolean readMore = false;
try