08-17-2023 06:52 AM - edited 08-17-2023 06:54 AM
@NoumanFaheem wrote:
Also is there way to shift it from UI to processing thread?
I don't know the answear to this.
@NoumanFaheem wrote:
Hi the actual question is why doesn't the core utilization go back to normal after it has zoomed the picture. if it goes back to normal it won't starve the UI thread.
in your simplified(1).vi executed on my machine this appears to be the case (" core utilization goes back to normal after zooming") , for both an empty image and a 895x895 image.
08-17-2023 07:24 AM
Yes that's true it does go back to normal. The issue arises when there are a lot of drawing objects on the picture control at that time the core utilization doesn't go back to normal.
08-17-2023 09:24 AM
@NoumanFaheem wrote:
The Map data is actually a huge collection of lines and other drawing objects .
Well, that would have been important to know from the beginning! Zooming a simple bitmap is very different than zooming a "picture" that has a huge number of drawing objects. (can you narrow down the term "huge? Hundred, thousands? millions?)
You don't need to share any proprietary data, but I am sure it would be trivial to generate a similar amount of random objects to create a realistic example.
So far you told us about the "size" of the picture indicator. Is the "map" data much larger than that? (e.g. if you would zoom out 100x, would it still fill the entire indicator? or would it only draw in a small area?)
@NoumanFaheem wrote:
I have tried these optimizations you mentioned in the last two messages but it doesn't improve the performance.
In the next message, you seem to attach exactly the same VI as before with none of the changes implemented. Very confusing! What's the point to attach the same VI twice in a row??
.
"Smooth updates" is probably more expensive, I am not sure why you want to enable that to improve performance..
Obviously, we need a better example that shows how you compose the map from objects. Is that done exactly once or dynamically as things change? Is the image data held in a shift register? Does it properly clear when drawing a new map?
08-18-2023 09:46 AM
For some extra information, could you wire a "string length" in parallel to the picture indicator terminal.
What is a typical size you see? Does it grow over time?
08-23-2023 02:58 AM
The string length is 2511839
I have narrowed down the issue. Suppose I have two kinds of drawings on the picture one is static and the other is moving. When I drew them together on the same picture control zooming in slowed down my front panel. So I decided to separate the layers and place two picture controls on top of each other making the top one transparent so that both of them add up to show a single picture. But it also slows down the front panel while zooming. But when I placed them side by side the moving and static picture controls the issue did not occur. Now the question is how can I add these two controls without adding front panel lag while zooming?