While developing a screen I noticed the navigation to the screen getting sluggish. If I open the diagnostics window I can see the SQLTags Changes/Second spike (around 40) when I load the screen. It takes about 2 seconds after clicking the navigation button for the screen to load. The other main screens load almost instantly.
The screen consists of about a dozen conveyor belts. Each belt is animated through a script bound to property change. Each belt (rectangle) then has a custom property of UDT type. That custom property (of each rectangle) is then bound to a conveyor UDT tag containing about 30 members. I’m only using three of these members (fault, running, test mode) to animate the state but I didn’t think it would have much performance impact.
Am I over complicating and overloading the screen by referencing the entire UDT? Below is the simple animation script bound to property change.
from java.awt import Color
if event.source.EquipmentTag.FaultIndication:
event.source.fillPaint = Color(255,0,0)
elif event.source.EquipmentTag.TestModeIndication:
event.source.fillPaint = Color(255,255,71)
elif event.source.EquipmentTag.RunningIndication:
event.source.fillPaint = Color(0,255,0)
else:
event.source.fillPaint = Color(0,0,255)
I should also note I have a button for each conveyor that also references the entire UDT. The button opens a popup and passes the UDT into it.
Thanks for any input.