LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with performance of memory flash comparator

Solved!
Go to solution

Hello, I have been doing a program to comparate 2 flash memories. It makes a table where equal values have white cell and different values have a red cell. I have made it using a table and changing the Cell color with property nodes in a for loop.

 

The performance is very low, because the for executes slower every time. I am not sure if it is because the table updates all the cells instead of the changing cell or what.

 

Anyway, I attach the VI. I don't know if there is another way to do it easier or something to improve the performance. Every idea is welcome.

0 Kudos
Message 1 of 5
(447 Views)

Defer panel update is the correct way.

You should also color the entire table with the more frequent color first and then only color the relevant cells differently. Less than 50% of the effort, even in the worst case.

 

You also need to remove the sequence structure and ALL local variables. They are completely pointless and just increase the use of resources.

0 Kudos
Message 3 of 5
(410 Views)
Solution
Accepted by topic author electronic_lab

So "defer panel updates" only gives you a factor of maybe four, so things are still way too slow. (Here's a quick test example that only processes 1000 rows and might still needs some tweaks, e.g. if you want the headers in a different color). Note that you cannot have a progress indicator inside the loop if panel updates are disabled and I got rid of that.

 

altenbach_0-1706287400569.png

 

 

 

What you need to do is only process and color the currently visible cells, then update whenever the scroll position of the table changes. Should not be too difficult to implement.

 

In any case, it is probably a really bad idea to have such massive amounts of data in a front panel indicator. You are severely taxing the UI thread! I would make a table sized to only the visible cells, then dynamically update the column headers, data, and coloring whenever an external control (e.g. a standalone scrollbar) is changed.

0 Kudos
Message 4 of 5
(384 Views)

I'm still quite new in Labview (only 1 month working with it) so I don't know much things.

 

I tried to only change 1 color before, but I don't know what color will be more frecuent. This VI is part of a bigger VI, but I simplified in order to attach it here. I didn't know the existence of Defer panel updates and I don't really know what is the UI thread. I will test all those things so I hope it works.

0 Kudos
Message 5 of 5
(318 Views)