Returns after encoding each message not do check following instance types

Motivation:
Current AbstractMemcacheObjectEncoder does unnecessary message type checking if the message is MemcacheMessage type.

Modifications:
Returns after encoding MemcacheMessage message.

Result:
Small performance improvement for this encoder.
This commit is contained in:
JongYoonLim 2015-03-19 14:25:19 +09:00 committed by Norman Maurer
parent d5e67032b5
commit 3405aee2ab

View File

@ -45,6 +45,7 @@ public abstract class AbstractMemcacheObjectEncoder<M extends MemcacheMessage> e
@SuppressWarnings({ "unchecked", "CastConflictsWithInstanceof" })
final M m = (M) msg;
out.add(encodeMessage(ctx, m));
return;
}
if (msg instanceof MemcacheContent || msg instanceof ByteBuf || msg instanceof FileRegion) {