LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bizarre Slowdown Unless Probe Window has Focus

I'm having a strange problem when reading data from a file into memory using LabVIEW's "Read from SGL file" VI and a bunch of array operations (Initialise, Replace Subset).  The read operation is run many thousands of times, as it resides inside two nested For Loops.
 
Without any outside intervention, the process takes quite a while to complete (a few minutes), although when all the data's been read it doesn't take up that much memory.  However, while I had some probe windows open on a completely different part of the program, I noticed that the speed became inexplicably much faster while the probe window was being moved.  In fact, it happens when I click and hold the mouse button on the border of the probe window, I don't have to move it at all.  The probe window doesn't have to be probing a point in a currently running SubVI.
 
Left to its own devices, the process takes about 10 minutes, during which time it uses about 3% of the processor time.  With a probe window focussed, it completes the process in about 20 seconds and uses about 50% CPU.  Fiddling with the process priority for LabVIEW.exe seems to have no effect.
 
LabVIEW 7.1, WinXP SP1 running on a 3GHz Hyperthreading P4 with 512MB RAM.
 
Any ideas?
0 Kudos
Message 1 of 3
(2,621 Views)
Hello Ian,
 
This is definitely strange. Would it be possible to post your code on the forum, (and the file your reading from if its not too big or sensitive information), then we'll take a look at it and see if we can reproduce this behaviour.
 
If you dont want to post the code on the forum, then we'll arrange a different method.
 
Regards
Hannah
NIUK& Ireland
0 Kudos
Message 2 of 3
(2,591 Views)
Something to do with the UI thread maybe? Perhaps the UI thread is waking and sleeping a lot (thrashing) during normal execution and clicking on the Probe is forcing it to stay awake (so no thrashing?). Is the loop code interacting with the front panel, writing to an indicator or reading from a control via a property node (which executes in the UI thread)?
 
Roy
0 Kudos
Message 3 of 3
(2,568 Views)