LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

It always takes me 3-5 minutes to save all LV project files, what is the reason?

hi, I built a project, and used some sub VIs for the main VI, and the main VI size is about 5M now, the project is pretty simple with basic functions like below

1, two VISA to communicate with my devices

2, about 5 XY charts are drawn in when runing

3, lots of global variables and local variables

4, related data processing calculations

the project runs well, but the problem now is that it always takes about 3-5 minuts when I click '''save all files' everytime after I modified something. it  really consumes me lots of time, but I have no idea what the computer is doing when I save the project. 

appreciate if someone can give me help on this.

thanks.

0 Kudos
Message 1 of 28
(2,353 Views)

BTW , before this happens, there was no problem when I did almost the same with other LV projects, so I do not thinkg this is something about my computer.

0 Kudos
Message 2 of 28
(2,349 Views)

Hi Dou,

 


@Powerdou wrote:

the main VI size is about 5M now,


I guess that's your main problem!

Try to reduce the mainVI size…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 28
(2,338 Views)

5 MB is not a good size for a VI.

 

When you say it wasn't slow before, was this in another version of LabVIEW? The compiler changed between 11 and 12 (IIRC) and the new LLVM compiler doesn't handle large VIs as good as the old one.

 

1 MB is big... 5MB is huge. There is probably some non-linearity going on, so from 1 to 5 MB could increase load\save\compile times quite a bit.

 

0 Kudos
Message 4 of 28
(2,337 Views)

Thanks for your inputs!

 

1, I am using same 2021 version now and before 

2, yes, there one sub-VI for exponential function calculation to draw a XY chart, but I am using a 1000 steps “for while” for the calculation, and this sub-VI is not always running, it only starts to run when being called by Main VI, and stops when it completes its for while loop.

3, BTW, There is a event case structure also used in my main VI, and there are about 200 cases included in this event case structure , is this the problem?

4, for the scenario like my project, I can not reduce the cases in my event case structure, is there any good suggestion for me?

 

thanks.

 

0 Kudos
Message 5 of 28
(2,317 Views)

Also, there is another problem I forgot to mention above.

some parts size changed a lot ( resized a lot) in front panel after I saved the project, this problem started from this afternoon.

 

0 Kudos
Message 6 of 28
(2,311 Views)

Hi Dou,

 


@Powerdou wrote:

Also, there is another problem I forgot to mention above.

some parts size changed a lot ( resized a lot) in front panel after I saved the project, this problem started from this afternoon.


Again: the main problem is that huge mainVI. Reduce its size by refactoring…

 

Simple solution to your "started from this afternoon" problem: revert to an older revision of your VI using your SCC tool!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 28
(2,302 Views)

5 MB is very big if it's code. If it's due to some background picture on the UI or Default values in controls it's another matter. 

I had a project that took ages to compile, it turned out i had some circular dependancies. Those can be quite hard to find though.

As suggested, start by refactoring and break out sub-vi's.

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 28
(2,283 Views)

@Powerdou wrote:

3, BTW, There is a event case structure also used in my main VI, and there are about 200 cases included in this event case structure , is this the problem?


It won't help...

 

@Powerdou wrote:

4, for the scenario like my project, I can not reduce the cases in my event case structure, is there any good suggestion for me?


Reduce the number of cases anyway.

 

There's no scenario where you want to have 200 event structure cases.

 

When you say you can't reduce that number, you probably mean you don't know how to do it.

 

We can help with that.

0 Kudos
Message 9 of 28
(2,276 Views)

@Powerdou wrote:

Thanks for your inputs!

 

1, I am using same 2021 version now and before 

2, yes, there one sub-VI for exponential function calculation to draw a XY chart, but I am using a 1000 steps “for while” for the calculation, and this sub-VI is not always running, it only starts to run when being called by Main VI, and stops when it completes its for while loop.

3, BTW, There is a event case structure also used in my main VI, and there are about 200 cases included in this event case structure , is this the problem?

4, for the scenario like my project, I can not reduce the cases in my event case structure, is there any good suggestion for me?

 

thanks.

 


This may make our eyes bleed but you are going to have to show us your code unless you want guesses.

Specific answers.

3: Yes, 200 event cases is a problem! A very big problem!  What kinds of Events are they?  Application? Filter? User? Dynamic?  200 user events is insane.  200 Dynamic events would have very bad code smell and could likely be simplified to postcard sized code.

4:I don't believe you have 200 unique "things to do" when something else happens.  I suggest you let us review the code.

 

OTHER concerns:

  • How many pixels wide and tall is the front panel? Are there splitters? Are any controls or indicators resizing when you save?
  • Is the drive you save to local or remote? Is it full? Is it on a Virtual Machineries? Does it have bad sectors? Has it been defragmented recently?
  • What SCC settings do you use? How is the repo doing? 
  • How about the Computer? What OS are you using? Is it "genuine?" What viruses does it have? How much RAM? Is the RAM good? What is the CPU usage during Save All? Memory usage?
  • LabVIEW: What is the setting for separation of code in the environment? In the Project? Did you try clearing the object cashe?  What Frameworks are running (Toolkits, look in <Framework Providers>\)

3+ minutes to save all is not normal. 

 

You are almost certainly using Local and Global variables wrongfully. 


"Should be" isn't "Is" -Jay
Message 10 of 28
(2,260 Views)