spinscale opened a new pull request, #15729:
URL: https://github.com/apache/lucene/pull/15729

   This change requires some explanation. While trying to understand how doc 
value skippers work, I noticed on skipper generation `input.prefetch()` is 
always called - essentially translating to an madvise willneed, indicating that 
this will be needed in the future. While for most other usage in the doc values 
producer this seems correct, in the case of the doc value skipper there there 
is the possibility to exit early without doing any disk accesses for min/max 
value and doccount, so the prefetch is wasted.
   
   My understanding of the madvise usage is that it mostly makes sense if we 
are sure to read ahead, which is not the case for doc value skippers.
   
   In addtion I also don't think it makes sense to move prefetching within the 
`advance()` call, as I suppose those are called when the data is actually 
needed, so prefetching would not help.


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