Hi Wander, thank you for your answer.
I tried your patch and got no improvement. get_endpoint_type() on line 603 is now called with an interface number instead of an Interface object and passes that parameter to get_interface(), so the slow get_interface() call is made on line 183 instead of line 602. (get_interface() gets slow when it calls find_descriptor() which calls desc_iter()) I don't see how to suppress the call to get_interface() in get_endpoint_type() as you need the bAlternateSetting attribute. Note that the solution of calling read() and write() with the Interface (which is easy to retrieve once for all) object instead of the interface number works fine so it's not a major issue. Also, when you reach line 609, you need to call fn() with intf instead of intf.bInterfaceNumber now. regards, -- Emmanuel On 05/10/2011 04:49 PM, wander.lairson wrote: > 2011/5/10 wander.lairson <wander.lair...@gmail.com>: >> The root of all trouble is the internal >> _ResourceManager.get_configuration method, that returns an interface >> object. If I change it to return the interface number instead, maybe >> the performance gets improved, either with an Interface object or >> interface number as parameter. Going to check that. >> > Please, try the the attached (untested) patch and check if you get any > improvement... > > > Wander > ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users