From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow update of (some) tree controls

I have an application with several tree controls and I observed that populating some of them took quite some time. Since the code to update them was the same (it was different instances of a QControl), and the data that is written to the tree controls was read from a database I first thought that it was the API method for the database reading that was slow (which was also the case for some parts). But after I while I discovered that it was the updating of the control itself that was the main reason to the slow update. And it took some more time before I figured out that the problem was not in the code (e.g. with defer panel updates) but with the tree control itself, which I had to replace with a "fresh" copy of a tree control to get a reasonable update time.

 

The attached project contains a test VI which contains a functional tree control and a buggy one, these are populated with the same data but have very different update times, e.g. on my laptop I observed the following timings:
- "Functional" tree: ~700 ms (defer panel updates enabled), ~14 s (defer panel updates disabled)
- "Buggy" tree: ~25 s (defer panel updates enabled), ~40 s (defer panel updates disabled)

 

Is this a known behaviour? It's been reproduced on other computers than mine so it seems like a bug (which have caused me to spend several hours of troubleshooting). I have seen other reports on slow updating tree controls (e.g. https://forums.ni.com/t5/LabVIEW/defer-panel-updates-doesnt-work/td-p/2848054?profile.language=en), so maybe it's been there for a while.

0 Kudos
Message 1 of 3
(1,771 Views)

Have you tried with "Add multiple items to end"?

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(1,753 Views)

So, a couple of tests:

If you copy the working control and replace the other one by selecting it and pasting, it's also fast.

I noticed the slow one had a different font setting, changing to the same made it slightly faster, but still far from each other.

Looking at all the differences as Multiple line input, Selection mode and others, none made a big difference. 

For some reason the Expand/Contract symbol type is active on the right one whereas only the top row is active on the fast one, that's the only difference i could find.

The control seems corrupted somehow .

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(1,742 Views)