High CPU usage due to tag-expressions using Expression "isAlarmActiveFiltered"

Hello.

I'm having a issue with high CPU usage.
When I'm diagnosing thread's, I see that there is "tag-expressions" that uses nearly 75% of my CPU usage.

I have a UDT that uses isAlarmActiveFiltered to set some boolean expression values to set the following statuses:

  • High_acked: if(!{[.]High_unacked} && isAlarmActiveFiltered("[default]*","*",concat("*",{InstanceName},"*"),3,4,0,1,0),1,0)
  • High_unacked: isAlarmActiveFiltered("*","*",concat("*",{InstanceName},"*"),3,4,0,0,0)
  • Medium_acked: if(!{[.]Medium_unacked} && isAlarmActiveFiltered("[default]*","*",concat("*",{InstanceName},"*"),2,2,0,1,0),1,0)
  • Medium_unacked: isAlarmActiveFiltered("[default]*","*",concat("*",{InstanceName},"*"),2,2,0,0,0)
  • Low_Acked: if(!{[.]Low_unacked} && isAlarmActiveFiltered("[default]*","*",concat("*",{InstanceName},"*"),1,1,0,1,0),1,0)
  • Low_unacked: isAlarmActiveFiltered("[default]*","*",concat("*",{InstanceName},"*"),1,1,0,0,0)

This is to use further to blink a red, orange or yellow symbol to indicate alarm status on a template.

When I'm disabling those tags, the CPU goes down to 24%.

I'm having quite many instances of the UDT, but is it normal that this expression uses so much CPU?

Is there any other ways to visualize active/active unacked and different alarm priorities?

Thank you in advance.

Yes.

Wait for v8.3, where this is fixed.

Or use a script to populate memory tags on a more leisurely schedule.

2 Likes

Thank you so much for answer.

Is it more recourse effective to program a script doing the same compared with using a expression?

It is most resource effective to make one call in a script to get all alarms of interest in the whole system, sort them by folder, and then write the results to each folder's memory tags. One call into the alarm subsystem, instead of calls all over the place.

1 Like

I have an Alarm Counter UDT with associated templates/views that I developed years ago with Travis Cox that does exactly what Phil is recommending. Let me know if you want it.

2 Likes

I would really appreciate that, but is it possible to use inside my existing UDTs so I get info if acitveacked/activeunacked in different priorities? :slight_smile:

Yes it is. I'll send the resources your way.