Click here to Skip to main content
15,903,012 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: XslCompiledTransform need to figure out number of rows transformed into text file Pin
TJoe10-Oct-07 7:02
TJoe10-Oct-07 7:02 
Questionthreading Pin
steve_a_p10-Oct-07 2:28
steve_a_p10-Oct-07 2:28 
AnswerRe: threading Pin
led mike10-Oct-07 6:14
led mike10-Oct-07 6:14 
AnswerRe: threading Pin
Luc Pattyn10-Oct-07 8:08
sitebuilderLuc Pattyn10-Oct-07 8:08 
GeneralRe: threading Pin
led mike10-Oct-07 8:35
led mike10-Oct-07 8:35 
QuestionRe: threading Pin
steve_a_p10-Oct-07 9:49
steve_a_p10-Oct-07 9:49 
AnswerRe: threading Pin
Patrick Etc.10-Oct-07 10:05
Patrick Etc.10-Oct-07 10:05 
AnswerRe: threading Pin
Luc Pattyn10-Oct-07 10:54
sitebuilderLuc Pattyn10-Oct-07 10:54 
The main message is it is not tens of threads: just adding more and more threads will
increase the overhead and not reduce the overall execution time. And it does depend on
the thread function: if it is pure computation, one thread per processor will do;
if there is I/O latency involved, two per processor will be better (and more typically
does not help due to I/O limitations); if it is a pure Sleep() you can have as many as
you want.

The good thing is if you organize things around Environment.ProcessorCount:
1. you can try another factor and observe what it brings you.
2. your app is less likely to suddenly behave badly when you move it to a system with
a different processor count (which may well happen when you fix the number of threads).

And as Patrick pointed out, you are not completely in charge:
1. with .NET you will not (easily) control which thread runs on which processor;
2. other apps and services will be running too.



Luc Pattyn [Forum Guidelines] [My Articles]


this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google


GeneralRe: threading Pin
steve_a_p10-Oct-07 11:19
steve_a_p10-Oct-07 11:19 
GeneralRe: threading Pin
Patrick Etc.10-Oct-07 10:02
Patrick Etc.10-Oct-07 10:02 
GeneralRe: threading Pin
Luc Pattyn10-Oct-07 11:02
sitebuilderLuc Pattyn10-Oct-07 11:02 
GeneralRe: threading Pin
steve_a_p10-Oct-07 11:09
steve_a_p10-Oct-07 11:09 
GeneralRe: threading Pin
Robert Rohde10-Oct-07 11:38
Robert Rohde10-Oct-07 11:38 
GeneralRe: threading Pin
Patrick Etc.10-Oct-07 11:47
Patrick Etc.10-Oct-07 11:47 
GeneralRe: threading Pin
Robert Rohde10-Oct-07 11:59
Robert Rohde10-Oct-07 11:59 
GeneralRe: threading Pin
Patrick Etc.10-Oct-07 12:32
Patrick Etc.10-Oct-07 12:32 
GeneralRe: threading Pin
led mike12-Oct-07 5:03
led mike12-Oct-07 5:03 
GeneralRe: threading Pin
Patrick Etc.12-Oct-07 6:06
Patrick Etc.12-Oct-07 6:06 
Questionwindows service to process SOAP call in.net2005 Pin
anumadhu9-Oct-07 23:38
anumadhu9-Oct-07 23:38 
AnswerRe: windows service to process SOAP call in.net2005 Pin
led mike10-Oct-07 6:18
led mike10-Oct-07 6:18 
QuestionRe: windows service to process SOAP call in.net2005 Pin
anumadhu10-Oct-07 22:08
anumadhu10-Oct-07 22:08 
AnswerRe: windows service to process SOAP call in.net2005 Pin
led mike11-Oct-07 5:36
led mike11-Oct-07 5:36 
AnswerRe: windows service to process SOAP call in.net2005 Pin
matee_code10-Oct-07 22:19
matee_code10-Oct-07 22:19 
AnswerRe: windows service to process SOAP call in.net2005 Pin
lmoelleb11-Oct-07 21:27
lmoelleb11-Oct-07 21:27 
QuestionWhy .NET Framework Pin
prithaa9-Oct-07 18:28
prithaa9-Oct-07 18:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.