lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Can ByteBufferIndexInput use buffering?
Date Thu, 20 Oct 2016 15:57:51 GMT
Hi,

adding buffering to ByteBufferIndexInput would not only be an anti-pattern, it would also
slowdown. What is the sense of coping data from memory location A to memory location B before
reading?

I'd suggest to read this and understand what virtual memory and ByteBufferIndexInput does
before trying to do anything like this: http://blog.thetaphi.de/2012/07/use-lucenes-mmapdirectory-on-64bit.html

Kind regards,
Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Ravikumar Govindarajan [mailto:ravikumar.govindarajan@gmail.com]
> Sent: Thursday, October 20, 2016 9:26 AM
> To: java-user@lucene.apache.org
> Subject: Can ByteBufferIndexInput use buffering?
> 
> When we use NIOFSDirectory, lucene internally uses buffering via
> BufferedIndexInput (1KB etc...) while reading from the file..
> 
> However, for MmapDirectory (ByteBufferIndexInput) there is no such
> buffering & data is read from the mapped bytes directly...
> 
> Will it be too much of a performance drag if I wrap ByteBufferIndexInput
> with a BufferedIndex? I mean like, is it an anti-pattern of zero-copy reads
> etc...
> 
> Any help is much appreciated
> 
> --
> Ravi


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message