Hello, Enumerating USB devices on the host buses may be quite time consuming. I need to enumerate these devices a couple of times at startup, and pyusb does not cache the results. The net performance penalty here is 0.7 second per "core:find" call, which slow down my application start up time.
What would be the recommended way to implement some kind of cache so that the physical enumeration only occurs once during a Python runtime session? Moreover, is there a simple way to disable the methodloggers in order to save time as well? Thanks, Manu ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 2.242 2.242 <string>:1(<module>) 1 0.002 0.002 2.242 2.242 {execfile} 1 0.002 0.002 2.240 2.240 pyterm.py:30(<module>) 1 0.000 0.000 2.234 2.234 pyterm.py:189(main) 1 0.000 0.000 2.232 2.232 pyterm.py:42(__init__) 1 0.000 0.000 2.232 2.232 pyterm.py:141(_open_port) 1 0.000 0.000 2.214 2.214 serialutil.py:212(__init__) 1 0.000 0.000 2.214 2.214 ftdiext.py:110(open) 1 0.000 0.000 2.213 2.213 ftdi.py:250(usb_find_all) 1 0.000 0.000 2.213 2.213 ftdi.py:689(_enumerate) 31 0.000 0.000 2.194 0.071 _debug.py:47(do_trace) 3 0.001 0.000 2.187 0.729 core.py:734(find) 4 0.000 0.000 2.171 0.543 core.py:803(device_iter) 3 0.000 0.000 2.168 0.723 libusb10.py:409(enumerate_devices) 3 2.168 0.723 2.168 0.723 libusb10.py:395(__init__) 1 0.000 0.000 0.025 0.025 util.py:221(get_string)
------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users