01-08-2014 12:20 AM
I have an application in which the main thread of the application calls the RunUserInterface, whereas another thread does the update of all the controls in the screen periodically. On analysis of the processor time utilised by the application, I am finding that, with just the periodic update of screen, the main thread takes more than 80% of the processor time out of the total time taken by the application/process. Is this an expected behaviour of Labwindows? My expection is that the thread on which update is done should take the maximum process time. And that's how I want it. Can someone comment on this?
01-08-2014 05:56 AM - edited 01-08-2014 05:59 AM
Ideally, a user interface program just sitting in RunUserInterface should take almost no processor time, since it is just ready for getting events. This situation can vary notably if the application has some task running like a UI timer that is periodically performing some operations. The situation can also be influenced by the CVI environment sleep policy that you can set in Options >> Environment window: Sleep Some is usually a good option for the user interface thread.
How much processor time does your program consume if you cut out data acquisition and display process?
And how are you calculating threads time? Are you using the execution profiler toolkit?
01-08-2014 06:26 AM