Re: [PATCH] Add compressed ID database support to (usb|pci)-db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-09-30 at 00:48 +0200, Lennart Poettering wrote:
> That said, generally speaking it's bad enough that we do a linar
> search for the vid/pid. 

You could do a binary search kind of deal, the entries are sorted. Not
sure it's worth the effort due to how things are laid out - you'd need
to search back or forward to find the first line not starting with
white-space.

> Compressing things won't make things faster.
> 
> Is there actually a distribution that uses a compressed pci.ids file?

None of the major distros does this kind of thing. And that is a good
thing - see below.

FWIW, this thing came up a couple of years ago on the hal list and back
then I very strongly refused to support compressed ids files. Mostly on
the grounds that it makes it impossible to mmap the files. E.g. you need
to allocate memory for the uncompressed image.

In udev this is even worse because we'd be doing all this work over and
over again - for every freaking event. In HAL, we mmaped the ids files
at start-up, built a simple look-up table and did binary lookups on
every event.

Just so you know, I'm still very much against this and I think it would
be a mistake to support compressed ids files in in udev. Please don't do
it.

      David


--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux