Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Performance / June 2005

Tip: Looking for answers? Try searching our database.

Thread.Start significantly slower than using ThreadPool

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tango - 04 Jun 2005 12:39 GMT
During some testing in a simple console application, the automated use of a
ThreadPool performs more than 8 times faster (100,000 cycles in 18secs) than
controlling the same application through Thread.Start (100,000 cycles in 2:30
+).

Is this typical?

I'm using

   Microsoft Visual C# .NET   2003
   Microsoft .NET Framework 1.1.4322 SP1
Jon Skeet [C# MVP] - 04 Jun 2005 15:07 GMT
> During some testing in a simple console application, the automated use of a
> ThreadPool performs more than 8 times faster (100,000 cycles in 18secs) than
> controlling the same application through Thread.Start (100,000 cycles in 2:30
> +).
>
> Is this typical?

Yes, starting a new thread is slightly expensive - but it's rare to
need to start 100,000 threads in a short period of time.

There are disadvantages to using the system threadpool though - you can
use a custom threadpool to get the best of both worlds.

See http://www.pobox.com/~skeet/csharp/miscutil

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.