Scripting - system.tag.exists

8.1.7

Seems that system.tags.exists gives very poor performance when validate an UDT path, I think that the functions browse all UDT before returning response.

I have compare with a system.tag.browse and browse is very more fasted than exists.

2021-06-21_17h06_37

I’m having similar issues, sometimes multiple seconds waiting for system.tag.exists to return, did you find a solution to this?

For now when I want to test existance of an UDT I use a system.tag.browse instead of system.tag.exists it’s really faster and i just do a validation like this => if len(result)>0: (exist)

What about just issuing a read directly for the given path? Under the hood that’s what system.tag.exists is doing as of 8.0, since it’s a ‘legacy’ function that we had to bridge to the new tag system. The quality of the result of a read should be sufficient to tell you whether the given tag exists.