title: Is it possibile to use mutithreading to make OpenOpc read faster OPC items?
body: <p>I'm using OpenOPC <a href="https://github.com/Alexhll/OpenOPC-python3.6/blob/master/src/OpenOPC.py" rel="nofollow noreferrer">https://github.com/Alexhll/OpenOPC-python3.6/blob/master/src/OpenOPC.py</a>
  and opcua libs to make a proxy for opc da (client) to opc da(server). In order to make it work i'm using the metod from OpenOPC</p>
  
  <pre><code>nodes = c.list('*',recursive=True)
  </code></pre>
  
  <p>to discover all the Nodes of the opc da server.
  However to discover 10000 items it takes about 3 minutes so i would like to make it faster. By debugging a little bit the OpenOPC libs i found that the line that is much more time consuming is</p>
  
  <pre><code>if lowest_level:  matches = [exceptional(browser.GetItemID,x)(x) for x in matches]
  </code></pre>
  
  <p>at line 1096. I tought that a good approach could be with multithreading with a pool map however i wansn't able convert it in multithreading beacuse of the decorator. Is it possibile to make this improvement or i'm completely wrong about this idea?
  what i tryied was this with no luck and i understand beeing wrong.</p>
  
  <pre><code>matches =pool.map(exceptional,matches)
  </code></pre>
  
  <p>here is the exceptional method from the libs at line 103:</p>
  
  <pre><code>def exceptional(func, alt_return=None, alt_exceptions=(Exception,), final=None, catch=None):
     """Turns exceptions into an alternative return value"""
  
     def _exceptional(*args, **kwargs):
        try:
           try:
              return func(*args, **kwargs)
           except alt_exceptions:
              return alt_return
           except:
              if catch: return catch(sys.exc_info(), lambda:func(*args, **kwargs))
              raise
        finally:
           if final: final()
     return _exceptional
  </code></pre>
  
  <p>Thank you for the help!</p>