Gateway Tag Change Script Vs Tag Scripting Value Changed

I have few Tags which each tag going to run function which mainly used to send API through httpclient POST .
There are two approach and i confused a lot which one is better

  1. in each tag, i will use Tag Event Script based on Value Changed

  2. in Gateway, i will use Gateway Tag change script

  • What's the different from performance side if i have a lot of tags going to call certain function for http client?

  • What's the different between two technique, while both can achieve the result ?

It is extremely bad to do slow functions in a tag's valueChange event. (Where slow means "longer than a millisecond or two or three"). You can lock up all tag scripts in your gateway.

Phil, I read this as it would lock all tag valueChange events in every tag provider on a single gateway.
Meaning, it’s not based on a per-tag provider basis. You get three? threads on a gateway to run tag valueChange events for all tag providers on said gateway.

The tags themselves won't lock up, but all tag event scripts will be blocked. And yes, gateway-wide, just three threads. (A similar thread pool is used for expression tags, too.)

1 Like