superkelvint opened a new issue, #935: URL: https://github.com/apache/lucenenet/issues/935
### Is there an existing issue for this? - [X] I have searched the existing issues ### Describe the bug I wrote a multithreaded indexer in Java for Lucene 4.8 and one for Lucene.net 4.8. I tried to do pretty much a line-for-line port. However, there is a substantial difference in the performance characteristics of the two. In Java, I used a ThreadPoolExecutor with CallerRunsPolicy, and in C# I used Parallel.ForEach. 1. The Java program scales more or less linearly to the number of CPUs. 2. The C# program doesn't seem to fundamentally speed up when increasing the number of threads. 3. The Java program completes in about 8 minutes with 4 threads, the Lucene.net version takes about 65 minutes with 4, 10 or even 20 threads. 4. It was very easy to max out CPU utilization in Java and pretty much impossible to do so in C#. I can provide both Java and .NET files, but before doing so, I wanted to understand if this is expected behavior and therefore not a bug. ### Expected Behavior Multi-threaded indexing performance scales with the number of threads used. ### Steps To Reproduce _No response_ ### Exceptions (if any) _No response_ ### Lucene.NET Version 4.8 ### .NET Version 8.0.204 ### Operating System Windows 11 ### Anything else? _No response_ -- 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