Slow Tag Loading

I have 6 scan classes, used for various remote devices and history.
All of them work well except for one.
The Default scan class has 302 Tags and has an Execution Time of 1 minute, 10 seconds!
Obviously something is wrong, but I don’t know how to work out what I need to change.
Could one tag be causing the problem, and how would I find which one it is?

I’ve attached a screenshot of the tag setup and tag status for info.

Thanks,
Dave




It’s probably an expression or DB/query tag running long… does that narrow it down any?

Hi Kevin,
All tags have a valid value. I can’t see any obvious expression or DB tags that would take a long time.
Are there any diagnostics that would identify the troublesome tag?

Thanks.

Hi,

Unfortunately, there isn’t currently a way to really pinpoint down what might be delaying a scan class. As mentioned, the most common cause is query tags. It might be one tag that runs a query that takes a minute, or 300 tags running 300 queries that average 200ms. Or it might be something else completely.

There are really just a few ways to try to narrow it down: First, after logging into the gateway, going to Status>Database Connections will let you watch the currently running queries. Turn on live values and watch it for a little bit. Do you see certain queries taking an observable amount of time? If so, perhaps you can optimize them a bit, or at least move them into their own scan class.

The next option is to start to break up the tags into various scan classes, and see if you can narrow down where the issue is. You can use the Tag Search button (first button on the tag browser tool bar) to quickly switch many tags. For example, you could find “opc tags” in the “default scan class”, ctrl-a in the list, edit, and move them all to a 1 second “opc scan class”.

Regards,

1 Like

Thanks Colby,
I found the troublesome tags.
It turns out that it’s expression tags that are using the “runscript” function.
I have a tag that indicates if a remote device is connected by checking if the port is open. The problem is that when the port is closed it takes a long time to return from the function. ooops!

I used the Tag Search feature as you suggested, I found it very useful. However there’s a problem with it, when I change a tags scan class and restart the Tag Search and search for a particular scan class, the old tags are still listed, even though they are not in that class anymore. Also, the number of tags found using the search does not equal the number of tags listed on the Tag Status page. Just thought you should know.

Cheers,
David

Hi,

Thanks for the update, I’m glad you found it. We’ll look into the other issues you mentioned. There are probably a few improvements we could make to that tag search…

Regards,