01-25-2011 07:25 AM
I have a logging VI which enqueues information to log queue. It is found in various places in my software.
Another VI runs as a background process and dequeueing the information for saving.
Sometimes (not sure when), I am experiencing a major slowdown in the software.
When I disabled (using disable diagram) the "Enqueue Element" in this VI - everything is working perfect.
I enabled it again and check the time before and after the enqueue operation and and got maximum of 2ms.
The slowdown is of few seconds, so I really don't understand what is happening.
I tried limit the queue size and use lossy enqueue - didn't change.
LabVIEW 2010 on XP.
Any suggestions?
Thank you,
Amir.
01-25-2011 07:29 AM
@Amir_Y wrote:
I have a logging VI which enqueues information to log queue. It is found in various places in my software.
Another VI runs as a background process and dequeueing the information for saving.
Sometimes (not sure when), I am experiencing a major slowdown in the software.
When I disabled (using disable diagram) the "Enqueue Element" in this VI - everything is working perfect.
I enabled it again and check the time before and after the enqueue operation and and got maximum of 2ms.
The slowdown is of few seconds, so I really don't understand what is happening.
I tried limit the queue size and use lossy enqueue - didn't change.
LabVIEW 2010 on XP.
Any suggestions?
Thank you,
Amir.
I think you stoped your investigation too early.
By disabling the enque queue you may have (probably) shut-down the work being done by the logging code.
I suggest you take the next step...
Enable teh enuquw again but now disable what is done with the data AFTER it is removed from the queue. I suspect the bottle neck is writting to file.
Ben
01-25-2011 07:39 AM
I'll add to what Ben has said. In the logging section you may want to disable the actual writing to the file, but still dequeue the data.

01-25-2011 07:43 AM
@LV_Pro wrote:
I'll add to what Ben has said. In the logging section you may want to disable the actual writing to the file, but still dequeue the data.
Thank you Putnam!
That was exactly my point and it very important to be able to "interpret the entrails" corectly.
Ben
01-25-2011 08:20 AM
Thank y'all,
Of course, you were right, the problem was somewhere else.
This queue led to another queue which caused the problem. The other queue was very large (thousands of cluster elements) and I used Get Queue Status in irresponsible way - returning all elements every 200ms...
Although it is running in parallel, it caused the slowdown in all the software parts.
Thank you again,
Amir.