You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Lucene.Net.Replicator.LocalReplicator::CheckExpiredSessions(), there is an extra .ToArray() call that allocates a new collection to iterate the Values:
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 (the call to ToArray()).
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Task description
In
Lucene.Net.Replicator.LocalReplicator::CheckExpiredSessions()
, there is an extra.ToArray()
call that allocates a new collection to iterate theValues
:lucenenet/src/Lucene.Net.Replicator/LocalReplicator.cs
Lines 135 to 146 in a739a80
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 thesessions
field will allow us to remove this extra allocation (the call toToArray()
).The text was updated successfully, but these errors were encountered: