When .NET 1.1 threads are faster than .NET 3.5!

Today at the GNET Michael Kennedy, Jason Whittington and I discovered a pretty interesting change in .NET 2.0 SP1 (included in .NET 3.5).

We knew they increased the thread pool limit from 25 threads/cpu to 250 threads/cpu, but we also found they changed the heuristics for creating threads to avoid creating a bunch of threads in a short period of time. In previous versions of .NET, threads were allocated at a rate of 1 every 500ms assuming there were queued items. This is documented behavior in MSDN.

In .NET 3.5, it appears to have been changed to a sliding scale where they slow down thread creation as more demand is placed on the pool. This is a change even from the beta and must have been slipped in at the last minute.

Michael documented the whole change on his blog here.. recommended reading.

About Mark Smith

Windows systems developer with low-level operating system, threading and .NET experience. For the past several years I have been involved with WPF/Silverlight and most recently iOS and Android. I have worked as an architect and designer for several companies and am particularly interested in client/server and graphical solutions. Specialties:.NET, WPF, Silverlight, Windows, iOS

Latest Blog Posts

Building Windows Store apps with HTML/JS and WinJS

Thanks to everyone who attended the WinJS marathon! Here's the slides and demos we … Read More »

NumericTextBoxBehavior for XAML-based Windows Store Applications

One of the first (and arguably most useful) behaviors that I wrote for MVVMHelpers was a … Read More »