Against 1.0.99.901. stracing Xorg on startup showed that it opens /proc/bus/pci/devices approximately 220 times. This seemed inefficient. Hence, patch. The attached causes it to just parse it once, and then use that data when it's asked for. Also includes a small bit to pull config space from /sys/bus/pci/devices/XXXX:YY:ZZ.A, which can be separated out (might need work with domains, but it looked like the previous code wasn't getting that right either.) The combined effect of this is to shave about half a second off of X server startup on my laptop (from 5.2 to 4.7 seconds.)
Created attachment 5288 [details] [review] patch for PCI code
Adding patch keyword
committed to HEAD
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.