navneet1v commented on PR #15722:
URL: https://github.com/apache/lucene/pull/15722#issuecomment-3930634284

   > > I don't mind the interface. But it does seem that the "scorer.bulkScore" 
should "just do the right thing" and prefetch if necessary.
   > 
   > Agreed, I think we'd like prefetching to be internal to the scorer.
   
   Thanks @benwtrent and @mccullocht for your input. I don't have concerns in 
doing prefetch inside the scorer.
   
   > The currently implementation does a synchronous madvise() syscall which I 
would expect to harm performance when everything is in memory and may be worse 
than doing a read when the data has spilled to storage.
   
   @mccullocht it is async. We make the call and then immediately return. Is 
your comment mainly that the call is in sync path rather than in a separate 
thread?
   
   > This would be a another query parameter unless we can reliably detect low 
memory conditions which is challenging if you let mmap manage caching :/.
   
   I think we can leave that to the application, and if we provide an 
implementation like PrefetchableScorer of RandomScorer, then during search an 
application can choose to pick a scorer based as per their needs. Is that 
something we can consider? 


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to