msokolov commented on code in PR #12844: URL: https://github.com/apache/lucene/pull/12844#discussion_r1408011800
########## lucene/core/src/java/org/apache/lucene/util/hnsw/NeighborArray.java: ########## @@ -31,18 +33,21 @@ * * @lucene.internal */ -public class NeighborArray { +public class NeighborArray implements Accountable { + private static final int INITIAL_CAPACITY = 10; Review Comment: We used to grow on demand, then we found arrays were always fully-populated and switched to preallocating, but the diversity check changed and they no longer are! So as far as that goes, growing on demand seems good to me, although I agree we need to check carefully due to concurrent updates to this data structure - that could be a deal-breaker or require locking we might not want? I'll read -- 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-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org