benwtrent commented on code in PR #14765: URL: https://github.com/apache/lucene/pull/14765#discussion_r2138143885
########## lucene/core/src/java/org/apache/lucene/util/hnsw/OnHeapHnswGraph.java: ########## @@ -32,6 +32,15 @@ */ public final class OnHeapHnswGraph extends HnswGraph implements Accountable { + private static final long RAM_BYTES_USED = + 4L * Integer.BYTES // all int fields + + 1 // field: noGrowth + + RamUsageEstimator.NUM_BYTES_OBJECT_REF Review Comment: I am switching all of this to a simple `RamUsageEstimator.shallowSizeOfInstance(OnHeapHnswGraph.class);` attempting to account for fields directly is just too complicated -- 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