msokolov commented on PR #13872:
URL: https://github.com/apache/lucene/pull/13872#issuecomment-2437752945

   > Can you clarify which allocation is the problematic one, and where it's 
done on the indexing path?
   
   See Ben's comments from ~2 weeks ago where he calls out the problem of 
overallocation. During indexing we call HnswGraphBuilder.diversityCheck() 
multiple times for each document (graph node) we insert, and in each of those 
calls we create scorers multiple times -- this is an n^2 algorithm (with n ~ 
number of neighbors). I'm proposing that instead of calling scorer() and 
creating a new scorer each time (which may in turn create a MemorySegment or a 
scratch array of some sort), that we instead have a mutable Scorer that can 
accept a new target vector.  


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