You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by GitBox <gi...@apache.org> on 2019/02/08 11:54:10 UTC

[GitHub] iverase commented on a change in pull request #569: LUCENE-8687: Optimise radix partitioning for points on heap

iverase commented on a change in pull request #569: LUCENE-8687: Optimise radix partitioning for points on heap
URL: https://github.com/apache/lucene-solr/pull/569#discussion_r255045631
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/bkd/BKDRadixSelector.java
 ##########
 @@ -294,18 +335,37 @@ protected int byteAt(int i, int k) {
       }
     }.select(from, to, partitionPoint);
 
-    for (int i = from; i < to; i++) {
-      points.getPackedValueSlice(i, bytesRef1);
-      int docID = points.docIDs[i];
-      if (i < partitionPoint) {
-        left.append(bytesRef1, docID);
-      } else {
-        right.append(bytesRef1, docID);
-      }
-    }
     byte[] partition = new byte[bytesPerDim];
     points.getPackedValueSlice(partitionPoint, bytesRef1);
     System.arraycopy(bytesRef1.bytes, bytesRef1.offset + dim * bytesPerDim, partition, 0, bytesPerDim);
     return partition;
   }
+
+  PointWriter getPointWriter(long count, String desc) throws IOException {
+    if (count <= maxPointsSortInHeap / 2) {
 
 Review comment:
   We divided by 2 because as we recurse, we have two `heapPointWriter` as maximum, so they should not hold more than half of the `maxPointsSortInHeap`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org