LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why table control is working so slowly with array of 70000 rows

Dear Colleagues,

 

Please help me to solve one problem:

 

My program is intended for reading from network SQL database about 70 000 rows (in one row about 20 cells) in table control (see my code attached here, but need Database toolkit).

So after reading (approx. 10 sec) so many data (LV after it occupy ohh !! 800 MegaBytes !!) user must be highght row it needed him (see event)... So after it my table control begins so slowly working.

 

You know, that at my PC the same functions are working properly and quickly in the C++ program!

So now I don't know how I must write the LV code in order to provide this.

 

Moreover, I think LabVIEW is intended only for education purposes and no for other.  Learn C++ and to you will be happiness.

 

 

 

 

 

0 Kudos
Message 1 of 19
(3,935 Views)

@Current_93 wrote:
...

Moreover, I think LabVIEW is intended only for education purposes and no for other.  Learn C++ and to you will be happiness.

 


This is one of the funniest quote. 😄

 

LV didn't occupy 800 MB of memory the data you are loading takes that much of space. You have used 15 Local variables and by this you have multiplied the data so thats the reason for the sluggishness. Program it properly then you will feel the difference.

-----

The best solution is the one you find it by yourself
Message 2 of 19
(3,926 Views)

Excuse me, but tomorrow I do for you a screenshot that appears for me my TaskManager - 800 MB, and 15 local variables so many memory can not occupy.

 

 

0 Kudos
Message 3 of 19
(3,916 Views)

I will try to give explanation based upon this (correct me if I am wrong)

 

Let say as you said 70,000 rows and 20 cells so your table may consist of 70,000 x 20 = 1,400,000 string spaces. Considering you have a string of length 4 so according to the link provided a string takes 10 + the length in bytes so each cell takes 14 bytes of data. So 1,400,000 x 14 = 196,00,000 bytes of data in 1 copy so multiply that with 15 of your local variables gives you 2,940,00,000 which is equal to 294 MB of memory. so when the length of your string increases obviously the memory occupied by the your data will increase.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 19
(3,903 Views)

I've changed my code and I leave one local rt_meas variable - but nevertheless - 800 MB occupy.

 

Sorry but it seems to me that LV life of it's own 

0 Kudos
Message 5 of 19
(3,899 Views)

Dear colleagues,

 

Now I want to prove to you that the LabVIEW has a life in spite of the rules.

See the same code attached below but it has not any local variables. Even in this case my exe build occupy 800 MB !   (See the screenshot attached here).

 

So I'm right. Smiley Happy   I am sure that very few people know how to solve this problem. This is not a problem, it is a normal situation for LV - rules are not working.

 

Moreover nobody knows how deallocating programmatically these 800 MB - it is a fantastic, I can not to do it. 

 

 

Download All
0 Kudos
Message 6 of 19
(3,870 Views)

Hi current,

 

sorry to say, but your VIs use way too much sequences and duplicate code.

And I do find several locals, not all are needed.

 

- Do you really need SharedVariables?

- When providing a ZIP with a handful of VIs you should give the name of the main VI instead of let us search for it...

- clean up your code (like put duplicate code sequences in subVIs, merge property nodes of the same control instead of using several of them, merge IndexArray nodes when accessing the same array, a lot more) and we will have a look at it again...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 19
(3,852 Views)

Thank you Gerd,

 

Your suggestions are appreciated, thank you, but I think that the value of 800 MB has not very changed... we'll try. 

 

I was most concerned about how I can to deallocate programmatically these 800 MB. 

0 Kudos
Message 8 of 19
(3,843 Views)

i made a multicolums listbox with 16000 rows and 4 columns....very slow 😞

 

i changed my listbox with a classic style mulicolumn listbox....it works in a perfect way 🙂

 

PS: don't use array, only string...and then before the output transform the string in array (spreadshet to array block)...let me know if it will be better 🙂

Using LabVIEW 7.1
0 Kudos
Message 9 of 19
(3,834 Views)

Ohh yes Gigi85!

 

I forget about it!  All "Classical" may help me. 

 

But "Only string"  - ???  I do not quite understand... from SQL query I receive an array.

0 Kudos
Message 10 of 19
(3,829 Views)