LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display a huge list of elements: Tree control, ActiveX or something else that can be filtered?

... And therefore thanks to this new magical function my code became this 🙂

The reason why I did not want to use arrays of strings is because of the memory impact vs keeping using multiline strings... But by looking at the memory usage of the VI when running it I do not see much difference... But of course it is way more quick with this "Match 1D String Array" function...

Thanks

Christophe

0 Kudos
Message 11 of 17
(599 Views)

Match Pattern seems to be faster than Match 1D String Array. Search/Split String is the fastest but you loose the pattern matching. You can gain additional execution speed if you use a Listbox for Filtered display instead of a string and keep the data as an array so you don't need to convert it with Array To Spreadsheet String after each filtering operation. 

Lucian
CLA
0 Kudos
Message 12 of 17
(588 Views)

Could you post your VI in LV12 please?

Thanks so much !

0 Kudos
Message 13 of 17
(584 Views)

For a tree control, I found DeferPanelUpdates isn't always enough.

 

Have you tried to hide the tree, do the inserts, then show it again?

 

EDIT:

Never mind that doesn't help a lot.

 

It does remind me of a combobox IIRC? Populating a combobox is fast up to ~5000, like <1. Then it goes up exponentially. Same for the tree. 15000 is a few seconds, 30000 takes 20 seconds, 60000 takes minutes. Seems like a O^2 algorithm, where a log(O) would be desirable. Typical when each element is searched for in the (growing) array of previous elements...

0 Kudos
Message 15 of 17
(561 Views)

As for a solution, you could still use the tree, just allow only one item to be opened at the time.

 

Populate the tree with only the 1st level items, and max. 1 2nd level item per item (so user can open the item).

 

When you open an item, close the other childs on that level and delete the 2nd level items (except one). Also add the rest of the items of the opened one.

 

That will limit the nr. of items that are actually in the tree. At the expense of more programming...

0 Kudos
Message 16 of 17
(552 Views)

This would be a perfect application for a Qcontrol. I don't know if there's a community example like this yet, but if not it would be a good one to submit.

0 Kudos
Message 17 of 17
(529 Views)