lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (LUCENE-2056) Should NIOFSDir use direct ByteBuffers?
Date Wed, 11 Nov 2009 19:20:39 GMT


Yonik Seeley commented on LUCENE-2056:

I have an uncomfortable feeling that it will be slower.
IIRC, there's no way to get a byte[] from a direct byte buffer, so all of our methods that
get a byte at a time will be making method calls.  If those calls were directly implemented
by the JVM as intrinsics... perhaps it would be faster.  In general though, I've learned to
lower my expectations (compared to the hype we've sometimes heard from Sun) and sometimes
I'm pleasantly surprised :-)

> Should NIOFSDir use direct ByteBuffers?
> ---------------------------------------
>                 Key: LUCENE-2056
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Store
>            Reporter: Michael McCandless
>            Priority: Minor
> I'm trying to test NRT performance, and noticed when I dump the thread stacks that the
darned threads often seem to be in {{java.nio.Bits.copyToByteArray(Native Method)}}... so
I wondered whether we could/should use direct ByteBuffers, and whether that would gain performance
in general.  We currently just use our own byte[] buffer via BufferedIndexInput.
> It's hard to test since it's likely platform specific, but if it does result in gains
it could be an easy win.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message