From: David Zeuthen <david@fubar.dk>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] Add compressed ID database support to (usb|pci)-db
Date: Tue, 29 Sep 2009 23:04:26 +0000 [thread overview]
Message-ID: <1254265466.1775.19.camel@localhost.localdomain> (raw)
In-Reply-To: <4AB83999.1060004@unitednerds.org>
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
next prev parent reply other threads:[~2009-09-29 23:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 2:42 [PATCH] Add compressed ID database support to (usb|pci)-db Piter PUNK
2009-09-22 22:28 ` Ozan Çağlayan
2009-09-23 4:33 ` Piter PUNK
2009-09-29 22:48 ` Lennart Poettering
2009-09-29 23:04 ` David Zeuthen [this message]
2009-09-29 23:31 ` Lennart Poettering
2009-09-29 23:41 ` Piter PUNK
2009-09-29 23:43 ` Piter PUNK
2009-09-30 0:03 ` Lennart Poettering
2009-09-30 0:08 ` Lennart Poettering
2009-09-30 1:16 ` Piter PUNK
2009-09-30 1:56 ` Greg KH
2009-09-30 2:50 ` Piter PUNK
2009-09-30 9:10 ` Frederic Crozat
2009-09-30 14:39 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1254265466.1775.19.camel@localhost.localdomain \
--to=david@fubar.dk \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).