On 25/09/2007, Rupert Smith <[EMAIL PROTECTED]> wrote:

> Current situation.
>
> Messages -> heap buffer.
> JVM takes data into a temp direct buffer (behind the scenes, this is how it
> does it more or less), copies into heap buffer (of fixed size).
>
> Solution 1:
> Messages -> direct buffer.
> Work out what the size is.
> Explicitly copy to heap buffer of the correct size.
>
> Presumably in the current situation, if compress is used, its an extra copy,
> heap buffer -> heap buffer. In solution 1, you get the compress for free.

OK I understand your logic now.

The question I have is why in our testing direct buffers are so much
slower than heap? Speaking to other groups (e.g. the Sun grizzly
project) they have also found this.

Have you done any microbenchmarking to arrive at these approaches?

RG

Reply via email to