You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Rob Butler <cr...@yahoo.com> on 2007/04/19 20:47:38 UTC

feature request

Hello all,

Some protocols pass along the length of a complete message within the message itself (HTTP, DNS, etc).  Instead of Mina constantly expanding it's buffers and calling into the protocol decoder it would be beneficial if there was some way to tell Mina what the expected size was.  That way Mina could allocate a buffer capable of holding the entire message once instead of doubling in size multiple times.  Also, calling into the decode could be post-poned until the entire message has been received.

This could probably be implemented as a filter, similar to CumulativeProtocolDecoder.
Rob



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: feature request

Posted by peter royal <pr...@apache.org>.
On Apr 19, 2007, at 8:47 PM, Rob Butler wrote:
> Some protocols pass along the length of a complete message within  
> the message itself (HTTP, DNS, etc).  Instead of Mina constantly  
> expanding it's buffers and calling into the protocol decoder it  
> would be beneficial if there was some way to tell Mina what the  
> expected size was.  That way Mina could allocate a buffer capable  
> of holding the entire message once instead of doubling in size  
> multiple times.  Also, calling into the decode could be post-poned  
> until the entire message has been received.
>
> This could probably be implemented as a filter, similar to  
> CumulativeProtocolDecoder.

Depends.. Since the original ByteBuffer is created when reading the  
data from the Channel. But if you want to work up a proof-of-concept  
patch, that'd rock!

-pete


-- 
proyal@apache.org - http://fotap.org/~osi