msokolov commented on a change in pull request #980: LUCENE-8920: Reduce the memory used by direct addressing of arcs URL: https://github.com/apache/lucene-solr/pull/980#discussion_r341526242
########## File path: lucene/core/src/java/org/apache/lucene/util/fst/FST.java ########## @@ -676,26 +697,38 @@ 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 + // If more than (1 / DIRECT_ARC_LOAD_FACTOR) of the "slots" would be occupied, write an arc + // array that may have holes in it so that we can address the arcs directly by label without Review comment: We should re-word this comment since the array *storage* doesn't really have holes in it? Maybe something like "write a bit vector indicating which array elements are present so that we can ..." ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org