You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2023/01/10 19:48:48 UTC

[GitHub] [solr] risdenk commented on a diff in pull request #1285: SOLR-16617: DocSetBuilder should use DocSetUtil#smallSetSize

risdenk commented on code in PR #1285:
URL: https://github.com/apache/solr/pull/1285#discussion_r1066248232


##########
solr/core/src/java/org/apache/solr/search/DocSetBuilder.java:
##########
@@ -42,11 +42,7 @@ public final class DocSetBuilder {
 
   public DocSetBuilder(int maxDoc, long costEst) {
     this.maxDoc = maxDoc;
-    // For ridiculously small sets, we'll just use a sorted int[]
-    // maxDoc >>> 7 is a good value if you want to save memory, lower values
-    // such as maxDoc >>> 11 should provide faster building but at the expense
-    // of using a full bitset even for quite sparse data
-    this.threshold = (maxDoc >>> 7) + 4; // the +4 is for better testing on small indexes

Review Comment:
   There isn't an indication if the above is better than `(maxDoc >> 6) + 5` - they are both the same idea. There are fewer callers of `DocSetBuilder` than the `DocSetUtil#smallSetSize` so stuck w/ the `smallSetSize` formula but could be convinced otherwise.



-- 
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-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org