Click here to Skip to main content
16,016,391 members
Home / Discussions / C#
   

C#

 
AnswerRe: Validating TextBox Pin
pbraun8-Mar-07 6:18
pbraun8-Mar-07 6:18 
GeneralRe: Validating TextBox Pin
Anthony Mushrow8-Mar-07 6:42
professionalAnthony Mushrow8-Mar-07 6:42 
AnswerRe: Validating TextBox Pin
Edmundisme8-Mar-07 6:59
Edmundisme8-Mar-07 6:59 
QuestionPerformance Question Pin
snorkie8-Mar-07 4:47
professionalsnorkie8-Mar-07 4:47 
AnswerRe: Performance Question Pin
kubben8-Mar-07 5:11
kubben8-Mar-07 5:11 
GeneralRe: Performance Question Pin
snorkie8-Mar-07 5:18
professionalsnorkie8-Mar-07 5:18 
GeneralRe: Performance Question Pin
kubben8-Mar-07 5:31
kubben8-Mar-07 5:31 
AnswerRe: Performance Question Pin
Luc Pattyn8-Mar-07 13:14
sitebuilderLuc Pattyn8-Mar-07 13:14 
Hi,

from the little you told us, I've got a feeling your app contains a busy loop
(i.e. a loop checking for something without including a delay such as Thread.Sleep)
and this loop runs many many cycles on a single-threaded CPU, whereas it gets statisfied
rather soon on a hyperthreading/multi-processor system. On the single-threaded CPU
Windows would assign most CPU cycles to the thread with the busy loop, and only few
are devoted to the next one or two ready threads; having more threading hardware would
give this/those other threads more opportunity to run, hence significantly reduce
the number of busy loop iterations.

If this is right, you should
1. look for the busy loop (might be as simple as while(someBool) {} )
2. and at least insert a delay in there, say Thread.Sleep(50)
which turns it into a polling loop (it no longer is a busy loop since it sleeps most of the time)
3. or better yet find a way to completely avoid the loop. The most appropriate way
would be to get the required synchronisation based on an event.

Hope this helps.

Smile | :)



Luc Pattyn

[My Articles]

QuestionCrystal Reports - Passing Parameters Pin
geekphreak8-Mar-07 4:41
geekphreak8-Mar-07 4:41 
QuestionPassing Variable to Program.cs Pin
electriac8-Mar-07 4:24
electriac8-Mar-07 4:24 
AnswerRe: Passing Variable to Program.cs Pin
Blue_Boy8-Mar-07 4:47
Blue_Boy8-Mar-07 4:47 
AnswerRe: Passing Variable to Program.cs Pin
pbraun8-Mar-07 6:15
pbraun8-Mar-07 6:15 
GeneralRe: Passing Variable to Program.cs Pin
electriac8-Mar-07 12:55
electriac8-Mar-07 12:55 
GeneralRe: Passing Variable to Program.cs Pin
pbraun8-Mar-07 13:09
pbraun8-Mar-07 13:09 
Questionlist of each layers for shapes Pin
chongkj8-Mar-07 4:01
chongkj8-Mar-07 4:01 
AnswerRe: list of each layers for shapes Pin
Edmundisme8-Mar-07 5:16
Edmundisme8-Mar-07 5:16 
QuestionCreating Clinet/Server protocol... Pin
yarns8-Mar-07 3:17
yarns8-Mar-07 3:17 
AnswerRe: Creating Clinet/Server protocol... Pin
Colin Angus Mackay8-Mar-07 3:24
Colin Angus Mackay8-Mar-07 3:24 
AnswerRe: Creating Clinet/Server protocol... Pin
Pete O'Hanlon8-Mar-07 3:25
mvePete O'Hanlon8-Mar-07 3:25 
GeneralRe: Creating Clinet/Server protocol... Pin
yarns8-Mar-07 3:43
yarns8-Mar-07 3:43 
AnswerUse Web Services Pin
Ennis Ray Lynch, Jr.8-Mar-07 4:00
Ennis Ray Lynch, Jr.8-Mar-07 4:00 
QuestionOOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 3:05
professionalArindam Tewary8-Mar-07 3:05 
AnswerRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
N a v a n e e t h8-Mar-07 3:12
N a v a n e e t h8-Mar-07 3:12 
GeneralRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Arindam Tewary8-Mar-07 18:00
professionalArindam Tewary8-Mar-07 18:00 
AnswerRe: OOPs question: whats the difference between these ways of accessing methods !!! Pin
Pete O'Hanlon8-Mar-07 3:23
mvePete O'Hanlon8-Mar-07 3:23 

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.