I have been facing a performance problem with my analysis. Basically we have 4000 instruments that can be activated if their readings are above a threshold. But this activation must least for 24 hours after activated.
Hence a simple logic would be:
If BadVal(Att) then NoOutput() Else if
TagMax(Att, '*-24h', '*') > Tolerance then 1 else 0
Periodic: 1 min (it really need to be a real time monitoring)
Though when I put all these analyses to run I am having a bottleneck because each tag has about 200 - 400 values to be analyzed and I am losing performance.
Do you have any suggestion to optimize such situation?