The fact that MMapIndexInput does no buffering is an important performance gain vs NIOFSDirectory which e.g. on seeking to a term loads way too many bytes.
Why do you want to add buffering to it? The OS should already do a good job keeping recently accessed pages hot, doing the buffering for you. Mike McCandless http://blog.mikemccandless.com On Thu, Oct 20, 2016 at 3:25 AM, Ravikumar Govindarajan <ravikumar.govindara...@gmail.com> wrote: > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org