performance of pci_device_get_{vendor, device}_name() in X server startup

Mikhail Gusarov dottedmag at dottedmag.net
Tue Jun 8 16:37:43 PDT 2010


Twas brillig at 15:55:59 08.06.2010 UTC-07 when jrbarnette at chromium.org
did gyre and gimble:

 >> The Right Thing that immediately comes to mind is fixing
 >> libpciaccess internals to be able to read data from saner (indexed,
 >> string-compressed, with common strings merged for different PCI ids)
 >> file format to avoid problem with linear search altogether. Given
 >> simplicity of data format it should be nearly trivial task.

 RB> I've considered this, too.  I think it's substantially more work,
 RB> and I'd worry that the cost/benefit ratio wasn't very good.  I
 RB> suspect the best way to thread the needle would include fiddling
 RB> with the "pciutils" package that provides the "pci.ids" file.

Actual source is http://pciids.sourceforge.net/v2.2/pci.ids.

libpci and libpciaccess just read this file. Libraries might as well
convert it to other format on first access or use pre-converted file.

 RB> I'd be interested in hearing if you know something about why the
 RB> cost is more worth it, because I agree that this is technically the
 RB> "right" way to do it.

It's basically the cache discussed in another thread, expanded to
contain all entries from pci.ids :) Hence the amount of work should be
approximately the same.

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100609/4427f7a8/attachment-0001.pgp>


More information about the xorg-devel mailing list