Click here to Skip to main content
15,908,634 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDrawDragRect color inverse? Pin
Anonymous21-Dec-04 9:12
Anonymous21-Dec-04 9:12 
GeneralCompiler does not update changed parameters Pin
21-Dec-04 6:38
suss21-Dec-04 6:38 
GeneralZoom Excel Sheet with C++ and MFC application Pin
Anonymous21-Dec-04 6:16
Anonymous21-Dec-04 6:16 
GeneralProving that CPU is "overloaded" Pin
Brad Bruce21-Dec-04 4:46
Brad Bruce21-Dec-04 4:46 
GeneralRe: Proving that CPU is "overloaded" Pin
David Crow21-Dec-04 8:14
David Crow21-Dec-04 8:14 
GeneralRe: Proving that CPU is "overloaded" Pin
Henry miller21-Dec-04 9:36
Henry miller21-Dec-04 9:36 
GeneralRe: Proving that CPU is "overloaded" Pin
Brad Bruce21-Dec-04 14:36
Brad Bruce21-Dec-04 14:36 
GeneralRe: Proving that CPU is "overloaded" Pin
Henry miller22-Dec-04 3:05
Henry miller22-Dec-04 3:05 
Well first you need to profile your code and see where and why it is taking so much CPU time. Often a small change can make a major difference. If you can get the amount of CPU you use down, that can mean a lot. If you can't get your CPU use down, you need to add more CPUs to the problem.

As for why you are seeing problems, I can only guess. Some things it could be:

Each time the OS switches processes you trash the CPU cahce, and it is taking that long to update because your processes aren't very cache friendly anyway. In this case if you can change how your look at data it might help. (ex: when looking at a 2d array perhaps you should loop on elements in a different order) This is a real problem, but it very complex.

Locks could easilly be a problem. The classic one thread grabs lock A, then lock B, while the other grabs lock B, then A - except it happens at the same time so both processes are hung waiting on the other. That you complete the tasks only suggests you have timeouts on your locks, so if you don't get a lock quickly you release all locks until you can get the others. This would explain your situation.

You said network was ruled out, but have you ruled out swaping? Maybe you just need to add more RAM.

If you are dealing with a database, hire an expert in that database to optimise your queries. You might be able to get some major improvements with some fancy work here.

My guess is that the code profiler will give you the most useful information.
GeneralRe: Proving that CPU is "overloaded" Pin
Brad Bruce22-Dec-04 12:21
Brad Bruce22-Dec-04 12:21 
GeneralWarning: no message line prompt for ID 0x8136... Pin
Anonymous21-Dec-04 4:36
Anonymous21-Dec-04 4:36 
GeneralRe: Warning: no message line prompt for ID 0x8136... Pin
David Crow21-Dec-04 4:46
David Crow21-Dec-04 4:46 
GeneralRe: Warning: no message line prompt for ID 0x8136... Pin
krmed21-Dec-04 6:38
krmed21-Dec-04 6:38 
GeneralRe: Warning: no message line prompt for ID 0x8136... Pin
Anonymous21-Dec-04 6:51
Anonymous21-Dec-04 6:51 
GeneralToolhelp32ReadProcessMemory() and ReadProcessMemory() fail Pin
TobiasLangner21-Dec-04 4:14
sussTobiasLangner21-Dec-04 4:14 
GeneralRe: Toolhelp32ReadProcessMemory() and ReadProcessMemory() fail Pin
David Crow21-Dec-04 4:42
David Crow21-Dec-04 4:42 
GeneralRe: Toolhelp32ReadProcessMemory() and ReadProcessMemory() fail Pin
Tobias Langner21-Dec-04 21:22
sussTobias Langner21-Dec-04 21:22 
GeneralWhere have the wizards gone, ActiveX Controls Pin
greekgoddj21-Dec-04 3:54
greekgoddj21-Dec-04 3:54 
GeneralRe: Where have the wizards gone, ActiveX Controls Pin
Antti Keskinen21-Dec-04 5:07
Antti Keskinen21-Dec-04 5:07 
GeneralRe: Where have the wizards gone, ActiveX Controls Pin
greekgoddj22-Dec-04 4:42
greekgoddj22-Dec-04 4:42 
GeneralRe: Where have the wizards gone, ActiveX Controls Pin
greekgoddj22-Dec-04 5:03
greekgoddj22-Dec-04 5:03 
GeneralRe: Where have the wizards gone, ActiveX Controls Pin
Antti Keskinen22-Dec-04 5:46
Antti Keskinen22-Dec-04 5:46 
GeneralVisual C++ read autocad(dxf) Pin
yangxjn21-Dec-04 3:49
yangxjn21-Dec-04 3:49 
GeneralRe: Visual C++ read autocad(dxf) Pin
David Crow21-Dec-04 4:44
David Crow21-Dec-04 4:44 
Questionserial port buffer full? Pin
Nik0n20-Dec-04 23:56
Nik0n20-Dec-04 23:56 
AnswerRe: serial port buffer full? Pin
Trollslayer21-Dec-04 2:06
mentorTrollslayer21-Dec-04 2:06 

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.