uschindler commented on issue #13920:
URL: https://github.com/apache/lucene/issues/13920#issuecomment-2448346922

   > > Opening new readers is too expensive and mostly not useful.
   > 
   > @uschindler one question on this, the reason why you say opening new 
readers is expensive because readers mostly open new IndexInput on a file? 
Also, one more question not related to particularly to this gh issue, does 
doing multiple times `new IndexInput(fileName)` opens the underline file 
multiple times and maps it at different memory address(if MMapDirectory is 
used) or the file is still mapped at same memory address?
   
   1. When you open the same file multiple times it mmaps several times. Lucene 
does not do this and should not do this. For this we have "clone()". So as said 
before: Just change the 
   2. It is expensive to open new index inputs for the reasons mentioned before.
   
   Please stick with the approach: Plan to implement an API to tell an existing 
IndexReader to switch to "merge" mode and the underlying codec then can 
optionally change the madvise for the already open indexinputs. When done, 
switch back.


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