# Slow response of tags

**URL:** <https://forum.inductiveautomation.com/t/slow-response-of-tags/53309>\
**Category:** Ignition\
**Tags:** ignition80, vision\
**Created:** [November 20, 2021, 6:54pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309 "2021-11-20T18:54:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [November 20, 2021, 6:54pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/1 "2021-11-20T18:54:52Z")

</div>

Hi All,

Have anyone of you experience the slow response of vision client and in the designer when you open a tag it took 6-8 sec to open. We already restarted our gateway and sql server but still the response is too slow like the other app we have.

Thanks in advance who will reply to this post.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [November 20, 2021, 8:31pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/2 "2021-11-20T20:31:27Z")

</div>

Sure, this happens when the server and the designer/client has problems to communicate due to slow net connection.  
Maybe a low internet connection or a bad vpn.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 20, 2021, 11:23pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/3 "2021-11-20T23:23:09Z")

</div>

Are you sure you aren’t overloading the PLC supplying the tags? Look in the gateway web interface for Status =\> Devices.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 22, 2021, 8:35am UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/4 "2021-11-22T08:35:15Z")

</div>

Also what’s reported in the gateway webpage for cpu and memory usage?

---

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [November 22, 2021, 11:59am UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/5 "2021-11-22T11:59:17Z")

</div>

I already checked the Logs and Gateway Status Overview but they’re all Normal and running well. CPU (25%) and Memory Usage(40% or 3-4GB) are also good. So I’m not sure why it suddenly got slow response. Vision client is like 4-7sec to response or opening a simple graphics took time to open.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 22, 2021, 12:37pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/6 "2021-11-22T12:37:30Z")

</div>

On the gateway, go to Status =\> Devices and select the device that is the source of the tags. That page shows load graphics and response time graphics. Take a screenshot and post it here.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 22, 2021, 7:45pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/7 "2021-11-22T19:45:28Z")

</div>

So it’s not just tag changes that are slow, the entire Vision client is slow?

Do you have any periodic calls run in the gui thread to any slow functions like `system.alarm.queryStatus`, `system.tag.*`, `system.db.*`?  
These will lock up your gui

---

<div class="post-metadata">

**Author:** ![JR7](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@JR7](https://forum.inductiveautomation.com/u/JR7)\
**Post date:** [November 23, 2021, 1:22pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/8 "2021-11-23T13:22:38Z")

</div>

Hi nminchin, pturmen, and jespinmartin1,

Thank you all for you inputs.

We disabled our realtime provider then the vision client runs normal and after that we disabled all the tag and get it back one by one. Then found out that there’s a specific tag that causes our vision, perspective and designer to be sluggish.

This tag has a script inside but I’m not sure why it affects all our vision, perspective and designer.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 23, 2021, 1:54pm UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/9 "2021-11-23T13:54:16Z")

</div>

Tag events have a limited pool of threads to execute on. Any given event code must run in a few milliseconds (on average) to not bog down other tags. Don’t use any form of sleep or busy-looping. Show your tag’s code and we can offer suggestions.

---

<div class="post-metadata">

**Author:** ![fleclerc](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/fleclerc/32/20480_2.png) [@fleclerc](https://forum.inductiveautomation.com/u/fleclerc)\
**Post date:** [November 4, 2022, 12:41am UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/10 "2022-11-04T00:41:28Z")

</div>

> [@pturmel](#):
>
> Tag events have a limited pool of threads to execute on. Any given event code must run in a few milliseconds (on average) to not bog down other tags. Don't use any form of sleep or busy-looping. Show your tag's code and we can offer suggestions.

Can we change the number of threads to execute tag event scripts?  
If there is a 'process heavy' script to execute, is there a way to call a script to run on another threads?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 4, 2022, 12:53am UTC](https://forum.inductiveautomation.com/t/slow-response-of-tags/53309/11 "2022-11-04T00:53:28Z")

</div>

> [@fleclerc](#):
>
> change the number of threads

Yes, there's a parameter that can be added to ignition.conf. I don't have it handy. (I consider it a crutch, not a solution.)

> [@fleclerc](#):
>
> call a script to run on another thread

Yes. `system.util.invokeAsynchronous()`. Note that if you have a busy tag spawning many threads, you can get into other trouble, especially if overlapping threads are manipulating the same resources.
