01-22-2020 09:23 PM
... 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
01-22-2020 11:55 PM
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.
01-23-2020 01:06 AM
Could you post your VI in LV12 please?
Thanks so much !
01-23-2020 01:20 AM
Here you go!
01-23-2020 07:24 AM - edited 01-23-2020 07:47 AM
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...
01-23-2020 07:53 AM
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...
01-23-2020 10:05 AM
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.