performance of pci_device_get_{vendor, device}_name() in X server startup
Richard Barnette
jrbarnette at chromium.org
Tue Jun 8 18:11:34 PDT 2010
On Jun 8, 2010, at 5:56 PM, Younes Manton wrote:
[ ... ]
>> One other option I've considered is to only extract the data if the
>> -verbose option is used. The problem I see is that while the calls
>> in xf86pciBus.c lend themselves readily to that solution, the calls
>> in xf86Configure.c aren't as obviously easy to deal with that way.
>> I'd be thrilled to be better educated on how all that code works.
>>
>> Thanks!
>
> For error messages the names could always be looked up as needed. At
> that point half a second probably doesn't matter as much as at
> startup. I don't have the src handy at the moment to find all the
> other uses, but non-error log messages needing the names, including
> xf86PciProbe, don't seem as critical.
The problem is that the code that may need to print the information
is decoupled from the code that knows how (and whether) to get the
information from libpciaccess. If the names aren't looked up in the
parts of the code that currently do the work, the names won't be easily
accessible when needed. Of course a generous reworking of the
interfaces,
complete with a callback, would solve the problem. Another example of a
cost/benefit ratio that (at first blush) seems a bit too rich for my
blood. :-(
-- jrb
More information about the xorg-devel
mailing list