# System.opc.browse perfermance

**URL:** <https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594>\
**Category:** Ignition\
**Created:** [June 12, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594 "2020-06-12T15:11:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [June 12, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/1 "2020-06-12T15:11:53Z")

</div>

I have a PLC with +/- 10 000 tags. I search a way to get path and value of each tag with term “config” in the path. I have a functionnal solution but it takes a very long times to do it. (30-40s).

Somebody know a better solution to do it in 3-4 s ??

```auto
def create_partConfig_OPC(cellule, cell_config, OPC_server, OPC_parent):
	tags = system.opc.browse(opcServer=OPC_server, folderPath="*" + OPC_parent.rsplit(".",1)[1] + "*", opcItemPath="*config*")
	
	for tag in tags:
		if tag.getType() == "DATAVARIABLE" and not "Document" in str(tag.getDataType()):
			path = tag.getOpcItemPath()
			cell_config[path] = system.opc.readValue(OPC_server, path).getValue()

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2020, 3:20pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/2 "2020-06-12T15:20:12Z")

</div>

If you know ahead of time roughly where in the PLC these tags you’re interested in might be then using `system.opc.browseServer` might be more efficient. `system.opc.browse` is a poorly implemented and fully recursive browse, so it’s always slow. `browseServer` on the other hand does no recursion it all; you give it a NodeId to browse, it tells you what’s underneath it, nothing else, if you want to continue browsing then you have to make another call.

There’s an old `browseServer` example [here](http://forum.inductiveautomation.com/t/system-opc-browsesimple-time-out-error/9997/5) that might help.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [June 12, 2020, 3:41pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/3 "2020-06-12T15:41:56Z")

</div>

Thanks for the trick. I got error on getNodeId()

object has no attribute ‘getNodeId’

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2020, 3:59pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/4 "2020-06-12T15:59:16Z")

</div>

Something weird is going on with this function when called from client/designer. I think it started returning the wrong results somewhere along the way. I need to investigate.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [June 12, 2020, 3:59pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/5 "2020-06-12T15:59:25Z")

</div>

system.opc.browseServer is not a good solution for me. The thing is that I don’t know path I have to reteive. The only thing I know is the server, the start node and that I require the term “config” into the path.

With the system.opc.browseServer it takes +/- 5min to reach all path instead of 35 sec with my solution.

More ideas for me ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 12, 2020, 4:00pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/6 "2020-06-12T16:00:04Z")

</div>

No more ideas then. Run your solution once and save the results somewhere. There’s no generic query/search facility for OPC UA.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [June 12, 2020, 5:02pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/7 "2020-06-12T17:02:50Z")

</div>

Is there a way to simply browse tag group ? I can create a tag group for my config tags then I will have only to browse that group to know the direct path to my OPC ???

---

<div class="post-metadata">

**Author:** ![kpswiney](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kpswiney/32/5232_2.png) [@kpswiney](https://forum.inductiveautomation.com/u/kpswiney)\
**Post date:** [June 12, 2020, 5:12pm UTC](https://forum.inductiveautomation.com/t/system-opc-browse-perfermance/35594/8 "2020-06-12T17:12:12Z")

</div>

Try .getServerNodeId().
