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
5dd3e883b1
commit
8cbc46a301
@ -45,6 +45,7 @@ public abstract class AbstractMemcacheObjectEncoder<M extends MemcacheMessage> e
|
|||||||
@SuppressWarnings({ "unchecked", "CastConflictsWithInstanceof" })
|
@SuppressWarnings({ "unchecked", "CastConflictsWithInstanceof" })
|
||||||
final M m = (M) msg;
|
final M m = (M) msg;
|
||||||
out.add(encodeMessage(ctx, m));
|
out.add(encodeMessage(ctx, m));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg instanceof MemcacheContent || msg instanceof ByteBuf || msg instanceof FileRegion) {
|
if (msg instanceof MemcacheContent || msg instanceof ByteBuf || msg instanceof FileRegion) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user