lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: how to adjust buffer size of reading file?
Date Thu, 05 Aug 2010 09:49:26 GMT
Which Directory impl do you use now?  EG MMapDir does no buffering in
javaland when reading.

You can make your own Directory impl, subclassing the one you use now,
and calling BufferedIndexInput.setBufferSize on every (certain?),
IndexInput/s returned from openInput?

Also, the low level API for opening a single segment does allow you to
specify the buffer size, but we've never punched this through to the
top API (IndexReader.open).

If you have performance numbers on difference buffer sizes please report back!

Mike

On Thu, Aug 5, 2010 at 2:17 AM, Li Li <fancyerii@gmail.com> wrote:
> I found the system call by java when reading file, the buffer size is
> always 1024. Can I modify this value to reduce system call?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
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