uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1844846435

   > > The best idea that I have instead of VarHandles: Create an 
implementation for ByteBuffer
   > 
   > do you mean create an implementation to get the current block as 
`ByteBuffer` for `BufferedIndexInput` `ByteBuffersDataInput` and 
`MemorySegmentIndexInput` like "wrapSliceAsByteBuffer()" ? then put the decode 
function `readGroupVInt` to `DataInput`?
   
   My idea was to create a utility class with a static method that does the 
decoding on top of a ByteBuffer. This method takes a ByteBuffer and the same 
remaining parameters. To allow reuse of bytebuffers also add a startoffset 
where encoding starts.
   
   In the several indexinputs just wrap a slice and call the static method. In 
ByteBufferIndexInput directly call the method. 
   
   The only downside of this is that the caller code must know beforehand how 
large the slice must be.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to