LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filling up several tables slows down CPU

Hi all,
I created a program that evaluates each table of values and build ing and updating the tables for 40 tests.
However,  I find that at first the tables are filled up quickly but gradually slowly as the tables are filled up with more values and updated.
I used the profile VIs and saw that the averagememory is increasing.
Any suggestions how I can make it go faster?
 
see the attached
 
Clement
0 Kudos
Message 1 of 7
(2,966 Views)
It makes sense that the memory is increasing because your program is holding more and more data with every test. The main thing I would look at is making sure that my array manipulation is as robust and efficient as possible. For example, if you can preallocate the memory for your data array ahead of time that would probibly be a good thing.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 7
(2,943 Views)
Hi Mike.
Thanks for your help.
Please advise how I can  pre-allocate the memory for my array manipulation.
 
Thanks again
Clement
0 Kudos
Message 3 of 7
(2,922 Views)

In addition to the suggsetsion from Mik (our newest LabVIEW Champion!) if you defer FP updates, hide the table, update it, un-hide it and then undefer FP updates, you may pick-up some performance.

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 7
(2,906 Views)
Hi Ben, Thanks
I have tried it before. it is still the same.
I removed it because I need to stop if it is taking too long.
Please advise me how I can prepare the allocation of the memory before the actual action took place, like Mike said earlier
 
regards
Clement
0 Kudos
Message 5 of 7
(2,888 Views)


Message Edited by Ravens Fan on 08-06-2008 10:43 PM
Message 6 of 7
(2,881 Views)
The concept is very easy. Use the Initialize Array function to create an array big enough to hold all the data in your series of 40 test runs. Then while the test is running, use the Replace Array Element to repopulate the array with the data from the test. This technique can totally eliminate the need for LV to reallocate array data while the tests are running.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 7
(2,879 Views)