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

Richard Barnette jrbarnette at chromium.org
Tue Jun 8 18:35:09 PDT 2010


On Jun 8, 2010, at 4:37 PM, Mikhail Gusarov wrote:

>
> 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.
>
Yup.  However, Chromium OS picks this file up through the pciutils  
package:
     http://mj.ucw.cz/pciutils.html

I think the right way to go about it (assuming development cost
is no object) is first to update pciutils to support an alternate,
faster access format for the pci.ids data and to provide the data
in both formats.  Then libpciaccess could be updated to take
advantage of the new format (presumably, by using the pciutils
library).

Still, cost/benefit matters here:  Essentially, the justification
for all this work is a debug feature (being able to print the  
information
in the log when things go wrong), not a performance enhancement.
I'm not yet persuaded that that feature is worth the identified effort.



> -- 
>  http://fossarchy.blogspot.com/

-- jrb



More information about the xorg-devel mailing list