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:
parent
d5e67032b5
commit
3405aee2ab
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user