uschindler commented on PR #15682:
URL: https://github.com/apache/lucene/pull/15682#issuecomment-3872172236

   > Looking where else LinkedList is used, and potentially miss-used as a 
Queue, I came across this case:
   org.apache.lucene.index.DocumentsWriterFlushControl#flushQueue
   
   I don't know that code specifically. LinkedList as a replacement for 
ArrayDeque is fine if the size of your queue is generally small and you add or 
remove items not too often. In that case it uses less memory and performance is 
not bad. But misusing LinkedList also for positional access (like some code 
does/did) should be fixed in all cases. Thanks for reminding about this old 
code.
   
   I am still not sure why DocumentsWriterFlushControl uses LinkedList.... That 
code is not too old. Maybe it si really because of small sizes and memory 
pressure?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to