NightOwl888 opened a new issue, #1070:
URL: https://github.com/apache/lucenenet/issues/1070

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Task description
   
   In `Lucene.Net.Replicator.LocalReplicator::CheckExpiredSessions()`, there is 
an extra `.ToArray()` call that allocates a new collection to iterate the 
`Values`:
   
   
https://github.com/apache/lucenenet/blob/a739a80c6424f1fcb42d6604022b2d0595d941bb/src/Lucene.Net.Replicator/LocalReplicator.cs#L135-L146
   
   J2N 2.1 includes the update to `J2N.Collections.Generic.Dictionary<TKey, 
TValue>` that allows deleting while iterating forward through the collection in 
older target frameworks. So, swapping the implementation of the `sessions` 
field will allow us to remove this extra allocation.


-- 
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: dev-unsubscr...@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to