stefanvodita commented on PR #12844: URL: https://github.com/apache/lucene/pull/12844#issuecomment-1834578138
I thought some more about option 2. It does seem quite tricky. `OnHeapHnswGraph` only knows about `NeighborArrays` being created, but it doesn't know about nodes being added to the arrays - `HnswGraphBuilder` handles that. I don't know this code well, so I could be missing something. I'm not sure if a more precise estimate is worth pursuing or not. I've pushed the version where we keep memory estimation like it was and I've added @dungba88's suggestions. I'll try to do a few more benchmark runs to see if there is a measurable slow-down and if we can reduce it by increasing `INITIAL_CAPACITY`. -- 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