LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow subpanel switching

I'm attempting to simplify a UI by placing a bunch of processes into a top level process using a listbox and a subpanel so you can click on the process UI you want to view in the listbox and it shows up in the subpanel.  Some of these VIs are reentrant (not sure if that matters).

 

I'm experiencing a strange delay (I'd guess ~500ms or so) when switching to one particular VI - the rest appear to switch immediately.  The slow-to-load VI front panel does have an image display in it but it's slow to come up in the subpanel even when no image is even present and doesnt worsen when an image is present...

 

I've been googling for slow subpanel switching and I'm mostly seeing issues that end up being problems within the VI's that are being inserted into the subpanel.  In my case, I'm only seeing a delay in the subpanel loading the vi, and no issues (yet haha) with the speed of the functioning vi.

 

Another side question- it seems some of the reentrant vi's that do some operation (like writing a value to their front panel when they're started) do not show any data in their front panel when theyre inserted into the subpanel after that action has ocurred- is that expected?  

 

thanks

0 Kudos
Message 1 of 4
(1,295 Views)

So a bit more work on the totally unrelated exit code of the top level vi and now the delay of about 500ms seems to have disappeared for... i have no idea what reason 🤔

0 Kudos
Message 2 of 4
(1,261 Views)

I would GUESS (and historically, I am REALLY good at guessing)

 

The slow insertions are due to a new clone instance being allocated.   This can take some time especially if the dataspace is large!

 

There are methods to bury that allocation time elsewhere in your code.  The "preallocate Clones" method comes too mind!  The LabVIEW help file and example finder would be useful in learning at least as much as I can type here.


"Should be" isn't "Is" -Jay
Message 3 of 4
(1,244 Views)

If the front panel isn't loaded when it's first called then the panel will need to be loaded when it inserts. Maybe you can configure it to load the front panel as Hidden, then show it when you click the button.

 

By the way- MGI's Panel Manager toolkit is a great one for doing work like this.

Message 4 of 4
(1,236 Views)