LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

As instances of a Class Increase - the Execution speed decreases - significantly

Hello,

Been developing a plug-in system.  Want to be able to allow for dynamic dispatch into the sub-panels dependent on what instruments you/your test rack are using.  However, what I've been noticing, if I have just a single DMM and a single Power Supply - the execution speed is exactly what I'd want it to be.  Quick and timely.  But when I increase the instances of these, the execution speed takes a severe hit.  What I mean is, the power supply and DMM poll much much slower.  Now, granted this is still in development mode and I'm not sure if that's got anything to do with it.  But in the development environment, all instrument classes are packaged into lvlibps.

 

Summary:

- I'm using Subpanels to load instrument plug-ins (so that means I do have a maximum allotted number of instruments that can be loaded).  Instead of using a device driver, I wanted to give users the ability to see their instruments in real time (granted, there's probably more effective ways to do this)

- As I increase the number of active plug-ins, the instruments query data slower and slower

- Note: all plug-ins run asynchronously and are bound by a 10ms Event Time out

 

Is there a setting in the subpanels that needs to made?  In the PPLs?  Something besides the plug-ins need to be reentrant?  Any thoughts?

0 Kudos
Message 1 of 3
(610 Views)

Without seeing your code it's hard to know for sure what's going on.

 

I can suggest two things to check:

 

First, can you alter your code in the plugin to record timestamps before and after all calls it makes?  If you can narrow it down to one VI somewhere that could help, even if it's theoretically a reentrant VI.

 

Second, do you use a lot of property nodes for controls in your subpanels?  It could be that you're writing things with the "Value" property to update them, but it could also be that you're doing things like changing font colors, background colors, and so on.  If you have all of those on one panel (via having them all in subpanels in the main panel) then it could be you're overwhelming the UI thread.  Check to see if you get a sudden performance increase by using setting the "Defer panel updates" property of your main panel to True, then briefly setting it to False on a regular basis before setting it immediately back to True (say, 5 times per second).

Message 2 of 3
(580 Views)

@Kyle97330 wrote:

Second, do you use a lot of property nodes for controls in your subpanels?  It could be that you're writing things with the "Value" property to update them, but it could also be that you're doing things like changing font colors, background colors, and so on.  If you have all of those on one panel (via having them all in subpanels in the main panel) then it could be you're overwhelming the UI thread.  Check to see if you get a sudden performance increase by using setting the "Defer panel updates" property of your main panel to True, then briefly setting it to False on a regular basis before setting it immediately back to True (say, 5 times per second).


I will certainly try this, I have noticed control delays in the plug-ins.  But yes, I am using property nodes to update certain things.  But I wouldn't say a lot.  I will evaluate, though.  Thank you.

0 Kudos
Message 3 of 3
(559 Views)