You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Shad Storhaug (Jira)" <ji...@apache.org> on 2019/12/25 22:36:00 UTC

[jira] [Commented] (LUCENENET-634) Investigate using alternative ConcurrrentHashSet implementation

    [ https://issues.apache.org/jira/browse/LUCENENET-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17003390#comment-17003390 ] 

Shad Storhaug commented on LUCENENET-634:
-----------------------------------------

We will need the {{UnionWith}} method from {{ISet<T>}} (In {{ThreadedIndexingAndSearchingTestCase}}) to be completely compatible with Lucene.NET. {{ISet<T>}} is also exposed publicly from {{TrackingDirectoryWrapper}}, which could be demoted to {{ICollection<T>}}, but it is a breaking API change.

So, as-is this implementation is incompatible. We will either have to bring it in and modify it or contribute the changes we need to make it function with Lucene.NET. We should also do some benchmarks to determine if we are gaining anything by doing so. Since we don't need any of the advanced {{ISet<T>}} functionality, the quickest path is to add the {{UnionWith}} method and break the 1 API that exposes {{ISet<T>}}.

We also need to either drop the .NET Framework target or bump it to {{net461}} in order to take on this dependency, as it only targets .NET Standard 2.0. But this is probably worth considering, since there are several other libraries we could use to improve performance that only target .NET Standard 2.0.

> Investigate using alternative ConcurrrentHashSet implementation
> ---------------------------------------------------------------
>
>                 Key: LUCENENET-634
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-634
>             Project: Lucene.Net
>          Issue Type: Task
>          Components: Lucene.Net Core
>    Affects Versions: Lucene.Net 4.8.0
>            Reporter: Shad Storhaug
>            Priority: Minor
>              Labels: performance, up-for-grabs
>
> There is a lower level implementation of ConcurrentHashSet available on NuGet that supports all of our target platforms:
> https://github.com/i3arnon/ConcurrentHashSet/blob/master/src/ConcurrentHashSet/ConcurrentHashSet.cs
> The only limitation is that it does not actually implement {{ISet<T>}}. I don't believe that will be a problem, though. But, since this collection is used directly in {{IndexReader}} it is worth looking into.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)