Author |
Topic  |
|
PhoenixDaCat
14 Posts |
Posted - 04 Mar 2005 : 03:31:12
|
Hi,
I've a really odd problem.
I have a multiform application, and one one form I have an instance of a realtime graph. A second form calls a method on the custom graph control to provide the data for setCurrentPosition.
The plotting speed of the graph is extremely slow, to the point that you can see it being drawn pixel by pixel.
If, however, I set the focus to another running windows application,and then switch back to the VB.NET application, the graph appears completely drawn.
The graph takes over minute to plot when I don't switch away from the app, but if I switch away and come straight back it is instantaneous.
Given that all the demo apps run fine, I doubt it is a fault of the graph component. I am actually upgrading 60,000 of someone elses code, so I am stuck with the multiform architecture of the application.
Could anyone suggest any reason why the graph draws so slowly in the circumstances described above? |
|
quinncurtis
1164 Posts |
Posted - 04 Mar 2005 : 09:25:29
|
Sounds like some task in your program, and not the graphics, is hogging all of the CPU time. When you switch the focus to another program the task is halted, allowing the other program, and other tasks within your program, to operate at full speed. So I would look for some sort of polling loop or high speed event driven task that takes place when your program has the focus. Thats easy enough to do. Just comment the graphics out of your program and find out where all the CPU cycles are going. Install a profiler (DevPartner) for the compiler, that would help. |
 |
|
|
Topic  |
|
|
|