If you receive 5 bytes then Mina will trigger through the schedule
mechanism which means it gets queued and a thread wakes up to process that.
That wakeup is one of the most expensive parts of the process. How often
Mina wakes up is defined by how the producer is writing data to the
socket.

As for the parsers it is much more simple and cost effective to buffer the
XML before processing it.
On Aug 15, 2014 3:29 AM, "Emmanuel Lécharny" <[email protected]> wrote:

> Le 15/08/14 08:15, Jon V. a écrit :
> > Yes, if the iohandle is blocking the execution then that would obviously
> do
> > it   That said I am not sure how the reactor threading in Mina would
> handle
> > very small messages sent in a way that prevents the data from
> aggregating.
> > Difference is 20k individual triggers or 1k triggers for the same number
> of
> > messages.
>
> That would nbot even be a problem for MINA : the small pieces of
> messages will just stay in memory until we can produce a message to push
> to the IoHandler. As soon as the bit read from teh socket has been
> processed, the thread is freed.
>
>

Reply via email to