weizijun commented on PR #14527:
URL: https://github.com/apache/lucene/pull/14527#issuecomment-2857434676

   > The underlying structures utilize `ArrayUtil.grow` to ensure capacity. 
This means its very easy to overshoot the maximum size. This is why I was 
saying we should use a new structure directly restricts the underlying buffers.
   
   I add the MaxSizedIntArrayList class to solve oversize problem.
   
   > I do not like this solution. Relying on the external builders to adjust 
estimates seems trappy.
   > Allowing neighborarrays to update via a callback seems way nicer.
   
   The neighbors array was updated frequently and irregularly, I changed some 
code so that OnHeapHnswGraph updates graphRamBytesUsed by itself.


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

Reply via email to