On 11/21/06, Mike Heath <[EMAIL PROTECTED]> wrote:

On Fri, 2006-11-17 at 14:47 -0600, Greg Duffy wrote:
> Direct buffers are, AFAIK, the only kind that can be accessed with JNI,
> which I use extensively. Just my $0.02.

I agree.  I got tired of waiting for JSR 203 so I have been
experimenting with the POSIX aio library in JNI.  I currently have
asynchronous file reads working and my initial experiments indicate that
direct buffers are significantly faster than heap buffers when used with
JNI.  Heap buffers can be used in JNI but you have to jump through hoops
to create a Java byte array and pass the byte array into the buffer or
vice-versa if you want to read the contents of a buffer.


That sounds amazing!

Once/if my AIO framework stabilizes, I'll run some additional
experiments comparing performance between heap/direct buffers in
standalone mode and with MINA.

If anyone's interested, I would be happy to post my AIO code in my
sandbox once it's in a state that others might find useful.


Sure!  Go ahead! :)

Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to