Jump to content

Tree Control property change speed


Recommended Posts

I have been trying to figure out a problem with the tree control that I just don't understand. :frusty:

For some reason, if I want to change the background color of a cell in the tree control, the amount of time this takes varies significantly based on what row I am changing. For an extreme example, I created a tree with 10,000 rows. I then timed how long it took to change the background color of the cell in row 0 and row 9999. The different was ~218x slower to set the color of row 9999.

Turning defer updates off had no effect on the speed

Using the row index instead of the tag name to set the active row had no effect on the speed

In another experiment, I tried changing each row's background color. As the row number increased, the execution speed of the code slowed down.

I then tried it in reverse, setting row 9999 first and then decrementing the row index through 0. This time the code got faster as it approached 0.

This really seems strange to me. I can't imagine why it would take over 200ms to set something simple like a color property. :throwpc:

See the attached VI for an example of this behavior.set tree cell color speed.vi

Anyone have any ideas on how to speed this up?

-John

Edited by John Lokanis
  • Like 1
Link to comment

This really seems strange to me. I can't imagine why it would take over 200ms to set something simple like a color property. throwpc.gif

It gets even stranger than that, at least for me. I downloaded your example just to see if I could figure out anything. This is what I saw:

If you're near the top of the Tree (first 1000 rows or so) all operations seem to go normal speed. Scrolling (either with scroll bar or clicking the scroll arrows), selecting different rows, and changing tools happen quickly.

But scroll to the last row and everything slows:

1) Scrolling slows to a crawl

2) Selecting rows is abysmally slow

3) Changing the tool is slow. Try hittting <TAB> 4 times quickly to move through the tool selection and watch the lag.

4) Even changing front panels is slowed. Switch from an empty VI to the example and back a few times. Scroll up to the top of the tree and repeat.

I've seen it on two PC's, both in 8.6 and 2009.

It's probably all related so hopefully it can be addressed by the same CAR.

-Scott

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.