You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by mat <fo...@gmail.com> on 2007/10/22 02:00:18 UTC

MessageDecoder or CumulativeProtocolDecoder

Is there any performance tradeoff by using MessageDecoder instead of
CumulativeProtocolDecoder?

Re: MessageDecoder or CumulativeProtocolDecoder

Posted by Trustin Lee <tr...@gmail.com>.
On 10/22/07, mat <fo...@gmail.com> wrote:
> Is there any performance tradeoff by using MessageDecoder instead of
> CumulativeProtocolDecoder?

There's small additional overhead determining a proper MessageDecoder;
DemuxingProtocolCodecFactory iterates all registered MessageDecoders
to call decodable().

However, I don't think it's a big overhead because most messages can
be determined from its first few bytes.  Once a proper MessageDecoder
is chosen, there's no overhead.

Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6