LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programming lags with classes

Hello

 

I am having real troubles with programming lags in LabVIEW while working with LabVIEW class libraries. I hope to get some hints on what to do against it.

 

I started using LabVIEW classes extensivly with inheritance and dynamic dispatching. I noticed that on projects I use these, I am getting slow response while programming the block diagrams. After every action I see the Windows circle for 1-2 seconds. This is more than annoying..

 

I have the same behavior in LabVIEW 2010 to 2013. My development system is a Win7 64bit i/ with 8 Gb RAM.

 

I have seen more posts on that issue but none with a real solution. Maybe there is some new knowledge around..

 

Kind regards

 

0 Kudos
Message 1 of 16
(2,759 Views)

Hello

 

I'd like to help you to find a solution for these annoying lags.

 

To find out, what caused the slow edit response time, I would like to have more information about these projects using the class libraries:

 

1. Refering to your text, you get these lags in projects with classes, thus there are no lags in projects without classes, are there?

2. Do you open the projects from a local machine or from a network?

3. How is the CPU usage when you are editing code with these lags?

4. Which size has your project?

5. How is the hierarchy of your project looks like?

                    -> How many LV classes do you use?

                    -> Which is the total number of VI call paths in VI hierachy (recursive code paths?) ?

 

 

Best regards,

 

Janina

0 Kudos
Message 2 of 16
(2,702 Views)

Hello Janina,

thank you very much for your reply.

I hope I can provide the information to find the cause. But I think it will be hard, because I see this only in medium to big projects and the those projects are a mix of different components. So it is hard to find the real cause digging into the projects. Also  the lags increase with development time on one project. So when I start LabVIEW, the development is ok. But after a while of development the lags get so long, that I have to shut down LabVIEW and reopen the project. I think this correlates with opened VIs or methods.

I reduced the count of undo steps and tried the setting for the compiler complexity. It didn't really help. Also I do frequently Mass Compiles.

The lags come after every single action in the block diagram. For example: Placing a VI - Windows Circle - Moving the mouse over the connector - Windows Circle - Connecting a wire - Windows Circle - Moving the wire in the block diagram - Windows Circle - etc..

1. Refering to your text, you get these lags in projects with classes, thus there are no lags in projects without classes, are there?
I think I saw it only in project with classes. The classes use mainly the data access via property nodes option. Also I use Singleton pattern with DVR

2. Do you open the projects from a local machine or from a network?
Only local machine.

3. How is the CPU usage when you are editing code with these lags?
You can see peaks in the system monitor, which correlate to the lags I guess. I attached a screenshot.

4. Which size has your project?
I ran VI metrics and saved the data. See attached file. Can I run other analysing tools? I have a standard developer suite.
I think the VI Metrics of the main VI is not complete, because some VIs are called by reference and loaded into subpanels.

5. How is the hierarchy of your project looks like?

                    -> How many LV classes do you use?

                    -> Which is the total number of VI call paths in VI hierachy (recursive code paths?) ?

I dont really know how to collect this information. The VI hierachy is not really usable, because it is a big project.
But most is structured into lvlibs or lvclasses.

Maybe you have some general information on how to reduce LabVIEW lagging.

 

Thanks

 

Download All
0 Kudos
Message 3 of 16
(2,673 Views)

Sorry,

I just noticed that the SystemUsage Screenshot is not representative. Yesterday I tried som other RAM settings, which now reduced the available RAM. I resetted those settings and attached a screenshot of system state after reboot.

I will try to capture another system usage screenshot at development tomorrow.

0 Kudos
Message 4 of 16
(2,663 Views)

I took some new system usage screenshots. #2 is taken at class data editing. #3 is taken when creating data access vis with the LabVIEW dialog. All in LabVIEW 2013.

Download All
0 Kudos
Message 5 of 16
(2,642 Views)

I added a screenshot of the class inheritance dialog. This gives a feel for th enumber of classes used.

0 Kudos
Message 6 of 16
(2,635 Views)

Try using the .lvclasses freely instead of in a project and compare how it feels.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 16
(2,610 Views)

Hello,

 

Thank you for the detailed information.

I had a look at the files and would like to see your code now, because referring to your .txt-file, there could be a problem with some code fragment.

You said that you have a similiar problem with other projects with classes, so you also could show me a smaller project file instead of this one, if this one is too large.

 

Kind regards,

Janina

0 Kudos
Message 8 of 16
(2,596 Views)

Hello Janina,

 

sorry, but I cannot give out the whole projects.

Can you point me to where the problems might be. I will see if I can send parts of the code.

 

The different class libraries are reused in different projects.

 

Regards

0 Kudos
Message 9 of 16
(2,580 Views)

Hello Yamaeda,

 

sorry, but I couldn't work without the project.

0 Kudos
Message 10 of 16
(2,577 Views)