romseygeek commented on code in PR #16142:
URL: https://github.com/apache/lucene/pull/16142#discussion_r3332539211


##########
lucene/CHANGES.txt:
##########
@@ -156,6 +156,9 @@ Optimizations
 
 * GITHUB#15597, GITHUB#15777: Reduce memory usage of NeighborArray (Viliam 
Durina)
 
+* GITHUB#16049: Avoid scanning linear-scanned clauses from

Review Comment:
   Move to 10.5



##########
lucene/core/src/java/org/apache/lucene/search/DisjunctionDISIApproximation.java:
##########
@@ -187,12 +187,16 @@ private DisiWrapper computeTopList() {
 
   @Override
   public int docIDRunEnd() throws IOException {
-    // We're only looking at the "top" clauses. In theory, we may be able to 
find longer runs if
-    // other clauses have overlapping runs with the runs of the top clauses, 
but does it actually
-    // happen in practice and would it buy much?
+    // Trade off longer run detection for a cheaper per-doc call: only inspect 
heap-led clauses
+    // that are already positioned on the current doc. Other iterators may be 
coincident with the
+    // current doc and have longer runs, or be the only clauses on the current 
doc, but scanning
+    // them

Review Comment:
   nit: formatting



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