edgexfoundry / device-opc-ua

Apache License 2.0
28 stars 26 forks source link

Support Reuse OPCuaClient to enhance performance #47

Closed ethan256 closed 2 months ago

ethan256 commented 2 months ago

πŸš€ Feature Request

Relevant Package [REQUIRED]

This feature request is for `device-opc-ua` ### Description [**REQUIRED**] When performance pressure testing the opcua acquisition, it was found that when acquiring 5000 points per second, the cpu usage was nearly 100%. After pprof, we found that the performance bottleneck occurs in HandleReadCommands and HandleWriteCommands functions. These two functions will build an OPCuaClient instance for each point, and then perform Dial, which leads to an increase in the number of points will consume more CPU. ### Describe the solution you'd like

Reuse OPCuaClient

jiekechoo commented 2 months ago

48 related

jiekechoo commented 2 months ago

Closes #48