dweiss commented on a change in pull request #657: LUCENE-8781: FST direct arc 
addressing
URL: https://github.com/apache/lucene-solr/pull/657#discussion_r279208389
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/util/fst/FST.java
 ##########
 @@ -632,36 +641,85 @@ long addNode(Builder<T> builder, 
Builder.UnCompiledNode<T> nodeIn) throws IOExce
     if (doFixedArray) {
       final int MAX_HEADER_SIZE = 11; // header(byte) + numArcs(vint) + 
numBytes(vint)
       assert maxBytesPerArc > 0;
-      // 2nd pass just "expands" all arcs to take up a fixed
-      // byte size
+      // 2nd pass just "expands" all arcs to take up a fixed byte size
+
+      // If more than 1/2 of the "slots" would be occupied, write an arc array 
that may have holes in it
 
 Review comment:
   Is this "1/2" consistent with the condition below (4 * nodeIn.numArcs)? 
Also, I think it'd be better to have the proportion as at least a constant or 
(better?) a configurable setting on the builder (not necessarily a constructor 
attribute).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to