[ 
https://issues.apache.org/jira/browse/LUCENE-2292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974788#action_12974788
 ] 

Michael Busch commented on LUCENE-2292:
---------------------------------------

bq. This class uses ByteBuffer, which has its overhead over simple byte[],

In my experience ByteBuffer has basically no performance overhead over byte[] 
if you construct it by wrapping a byte[].  The JVM seems smart enough to figure 
out that there's a good old array behind the ByteBuffer.

But if I allocated the BB in any other way it was 2-4x slower in my simple 
tests on a mac with a sun JVM.

So it might be the right thing to put these changes into RAMDirectory and have 
it by default wrap a byte[] and add an (expert) API to allow allocating the BB 
in other ways.

> ByteBuffer Directory - allowing to store the index outside the heap
> -------------------------------------------------------------------
>
>                 Key: LUCENE-2292
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2292
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Store
>            Reporter: Shay Banon
>         Attachments: LUCENE-2292.patch, LUCENE-2292.patch, LUCENE-2292.patch
>
>
> A byte buffer based directory with the benefit of being able to create direct 
> byte buffer thus storing the index outside the JVM heap.

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to