|
Re: CPU at 100%
Unless it has been modified, the compressor loop has a 1000ms delay. If it ends immediately and you invoke it again in a loop, it will once again sleep that thread for 1000ms. This shouldn't cause 100% CPU usage.
If you do not see a loop without a delay, look for a loop with more work it is doing than time to do it in. If a loop sleeps for 20ms, but uses the CPU for 15ms, the CPU is guaranteed to be above 75% usage. If it runs for 20ms, the CPU is guaranteed to be at 100%.
If you cannot find the loop by looking, consider debugging your code using either the Performance Profiler or using the Elapsed Time VI. Both of these will give you precise numbers about how things are running. It is a lot like turning a light on in a dark room. It is amazing what you find sometimes.
Greg McKaskle
|