NightOwl888 opened a new issue, #836: URL: https://github.com/apache/lucenenet/issues/836
This has been a known issue for quite a while. Some of the tests in Lucene.Net.Facet are running much slower than they do in Lucene 4.8.1. While the tests are randomized so they vary quite a bit. These are consistently slower than they are in Java. These are some comparisons to demonstrate approximately what the gap is. These are results from Java SE 7 vs .NET 6.0. | Test | Lucene Duration | Lucene.NET Duration | |---|---|---| | `TestDirectoryTaxonomyWriter.TestConcurrency()` | 4.5 s | 10.7 s | | `TestAddTaxonomy.TestBig()` | 10.9 s | 16.7 s | | `TestTaxonomyCombined.TestTaxonomyRefreshRaces()` | 16.1 s | 46.2 s | The other tests seem very reasonable in terms of performance. In the past, we have seen this sort of thing happen due to locking contention and we successfully overcame it by reviewing locks both in Lucene and in the JDK to make sure of several things: 1. That we are not missing a lock. 2. That we are correctly sharing locks between subclass and superclass. 3. That all collection types are being locked appropriately and that the implementation of the collection locks in a similar way in both environments. This is where some pretty big gaps are between Java and .NET. 4. If we still haven't found the issue, revert back to "plain old locks" (in our case `UninterruptableMonitor.Enter(syncLock)`) instead of using more advanced techniques that are available in C# to avoid locks, such as `ReaderWriterLockSlim`. Lucene.Net.Facet has been refactored several times to try various ways to synchronize locks so it would be prudent to go back to basics to find a solution that is stable first. Once we have found a stable solution, we can begin looking at ways to avoid locks and ease into them to ensure concurrency is stable. -- 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