[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libusb-devel
Subject:    Re: [Libusb-devel] [PATCH v2 0/2] OSX performance bug
From:       Vitali Lovich <vlovich () gmail ! com>
Date:       2011-12-21 5:13:02
Message-ID: CAF8PYMhxOnb5aR5KDZmkjTLzJDoNaYvZgb+B0jHmOpgeqT31sg () mail ! gmail ! com
[Download RAW message or body]

On Tue, Dec 20, 2011 at 8:35 PM, Nathan Hjelm <hjelmn@me.com> wrote:
> On Dec 17, 2011, at 1:15 PM, Vitali Lovich wrote:
> 
> > Hmm - still get into a problem where the device handle fails to open.
> > Hoping Nathan can help provide some insight.
> 
> Can you elaborate?
I'm not sure.  Now it seems fine.  Could be my app had a bug in it
(still actively fixing some issues in some brand new code).  I think
the patch just needs to go through some testing to make sure it
actually works.
> 
> > On Sat, Dec 17, 2011 at 2:22 PM,  <vlovich@gmail.com> wrote:
> > > From: Vitali Lovich <vlovich@gmail.com>
> > > 
> > > This fixes the potentially expensive operation that is used during an open \
> > > call. As Xiaofan pointed out, it was discussed earlier in
> > > http://libusb.6.n5.nabble.com/Mac-OS-libusb-open-time-td3399209.html with no \
> > > actual resolution.  The pointer appears to already be in the correct structure \
> > > to make open an O(1) operation.
> 
> I was hoping not to have to cache the IOUSBDeviceInterface but if adding the device \
> location to the lookup dictionary didn't help it might be unavoidable.
Yeah.  On the other hand, I'm pretty sure this is the intent of the
API; that you keep that handle around for as long as you need it.
From the profile, it looks like it's simply creating the iterator &
using it that are the expensive parts.

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Libusb-devel mailing list
Libusb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusb-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic