rmuir commented on code in PR #13450:
URL: https://github.com/apache/lucene/pull/13450#discussion_r1626828513
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -370,6 +370,16 @@ public void prefetch(long offset, long length) throws
IOException {
}
}
+ @Override
+ public void readAhead(long offset, long length) throws IOException {
+ // Start loading the first bytes in the background
+ if (length != 0) {
+ prefetch(offset, 1);
+ }
+ // TODO: Is there a hint we can give to the OS to let it optimize for our
forward-only access
+ // pattern in the given range?
+ }
Review Comment:
or even better, `MADV_NORMAL` for the range, which is less aggressive.
--
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]