Garbage Collection and Parallel.ForEach Issue After VS2015 Upgrade
This indeed performs excessively poorly, the background GC is not doing you favor here. First thing I noted is that Parallel.ForEach() is using too many tasks. The threadpool manager misinterprets the thread behavior as “bogged down by I/O” and starts extra threads. This makes the problem worse. Workaround for that is: var options = new … Read more