gautamworah96 commented on code in PR #13149: URL: https://github.com/apache/lucene/pull/13149#discussion_r1514939090
########## lucene/core/src/java/org/apache/lucene/util/bkd/DocIdsWriter.java: ########## @@ -318,9 +378,8 @@ private static void readLegacyDeltaVInts(IndexInput in, int count, IntersectVisi private void readDelta16(IndexInput in, int count, IntersectVisitor visitor) throws IOException { readDelta16(in, count, scratch); - for (int i = 0; i < count; i++) { - visitor.visit(scratch[i]); - } + scratchDocIdSetIterator.reset(count); + visitor.visit(scratchDocIdSetIterator); Review Comment: @antonha Maybe add a small comment here explaining that we found using a DISI was much faster than visting docs individually? People usually attach the PR id to the comment in case someone wants to dig deeper. Many a times, I have learnt about why something was implemented a certain way through these comments. -- 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