From: Lei C. <Raymond.Chen@Sun.COM> - 2008-09-13 06:22:28
|
Tim Roberts wrote: >> >> Sometimes we need to get or search for an attribute in a specific >> configuration descriptor cloud. I don't want to match bConfigValue >> against every configuration descriptor cloud. So, an index pointing to >> that configuration descriptor where the required bConfigValue lives may >> be simpler and faster. >> >> > > Configuration descriptors are at most a few kilobytes, and usually much > less. Is this really worth the trouble? > Probably it's worth. Since we're not caching any descriptors in the library, we have to read the descriptors from the device every time we need them. If we know the index, we can shoot at the exact target. Besides, I don't think an additional index is a big trouble. It's just a by-product when getting/setting descriptors. Thanks, Lei Chen |