Discussion:
Filling up several tables slows down CPU
(too old to reply)
astroboy
2008-08-05 03:40:05 UTC
Permalink
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


slow_processing.llb:
http://forums.ni.com/attachments/ni/170/346534/1/slow_processing.llb
mikeporter
2008-08-05 08:40:05 UTC
Permalink
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...
astroboy
2008-08-06 01:10:04 UTC
Permalink
Hi Mike.
Thanks for your help.
Please advise how I can  pre-allocate the memory for my array manipulation.
 
Thanks again
Clement
Ben
2008-08-06 11:10:07 UTC
Permalink
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 
astroboy
2008-08-07 02:10:04 UTC
Permalink
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
Ravens Fan
2008-08-07 02:40:06 UTC
Permalink
<img src="Loading Image..."> Message Edited by Ravens Fan on 08-06-2008 10:34 PM


Example_VI_BD6.png:
http://forums.ni.com/attachments/ni/170/347337/1/Example_VI_BD6.png
mikeporter
2008-08-07 02:40:06 UTC
Permalink
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...
Continue reading on narkive:
Loading...