bruno-roustant commented on a change in pull request #1281: LUCENE-9245: 
Optimize AutomatonTermsEnum memory and automaton 
Operations.getCommonPrefixBytesRef.
URL: https://github.com/apache/lucene-solr/pull/1281#discussion_r383154930
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/index/AutomatonTermsEnum.java
 ##########
 @@ -54,18 +56,20 @@
   private final boolean finite;
   // array of sorted transitions for each state, indexed by state number
   private final Automaton automaton;
-  // for path tracking: each long records gen when we last
+  // for path tracking: each short records gen when we last
   // visited the state; we use gens to avoid having to clear
-  private final long[] visited;
 
 Review comment:
   Main change is replacing the long[] by a short[] to reduce memory usage (the 
size is the number of automaton states). I also tried a FixedBitSet but it 
impacts perf.

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