Good tag reading and writing practices help

I have a coworker who has tag reads and writes nested in loops.

I sent him this video:
Strategies for Optimizing Your Ignition System Performance | Inductive Automation
Seems to have the opposite effect of what I expected.

I tried to say like, reduce the number of tag reads and writes, they all have overhead on the gateway.
I got back an email that the video says it is okay for up to 12,000 tags.

I also need some clarifications. My understanding is that scripts running on the Perspective pages are all being run on the gateway. That when scripts are said to be "client run scripts", this terminology is only applicable to Vision clients.
I am pretty confident in that, so I hope I am not wrong. However, my coworker said his scripts are running in the clients, but I think he means in the sessions that still run on the gateway.

I still need help with this.

Did you show them this:

1 Like

Yes, I did. And thanks again.
I also keep it printed out next to me.

1 Like

In perspective, everything runs in the gateway.

Here is a link (with other links as well) for reference:


The same video also says that between single reads and all reads, always choose all reads.


Sometimes I think that I have this stuff very well understood.
Then I hear something so contradictory, that I have to question everything.

I did not watch that video as it's quite long, but they may have meant "client run scripts" in regards to perspective as in a client/user triggers the script to run via a button press in a view, but you're still correct in that all scripts in perspective run on the gateway.

What do you think has been contradictory? I think what everyone is saying here is what you already know or suspect - everything runs on the gateway in perspective, and that system.tag.readBlocking(['all','your','tags','in','one','go']) is better than doing a call per tag.


Who meant Client run scripts when?

If you mean my coworker, I think he meant that he didn't think the script ran on the gateway.

My coworker watched that video, and then came back with some understanding that was contradictory to mine.
It was so different, I had to question what I knew.
I tried to say some of that in the first post.

In the video, I am not sure what an all reads is.

In v7 there was and system.tag.readAll(). readBlocking() replaced those.


Sorry, meant to say that from the bits and pieces I've seen (I haven't fully watched it either), it seems @Kyle_Chase was referencing vision clients. So, I just pinged him in this post to see if he can clarify.(Thanks Kyle, I'll watch it all the way through... really!)


Oh. And you have my permission to tell him, "Jordan wants to know why you're deliberatly writing inefficient code". :wink:


Him Kyle, or him me?
If I write inefficient code, I don't know the better way.

Him, as in Zachary-asking-his-co-worker.


You want to minimize the number of system.tag.readBlocking calls. The number of tags has a minimal impact on performance. In perspective, the client session exists on the gateway. This will minimize the impact of multiple readBlocking calls, because there is no network latency between the client session and the gateway. There is a balance between writing understandable code and performant code, you will have to judge where to draw this line for your application.