Hi!
I have a script similar to this (don't take literally the script is just an example):
objects = [] # list of objects
for obj in objects:
tag = system.tag.readBlocking([obj.get("fullPath")])
# do something
results.append()
return results
However, I'm wondering if it would be better to read all tags at the same time and then process them.
objects = [] # list of objects
paths = []
for obj in objects:
paths.append(obj.get("fullPath"))
tags = system.tag.readBlocking(paths)
for t in tags:
# do something
results.append()
return results
Note that the object list could be about 1000+ items long depending on the plant.
What do you think?