From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] udevd: Shrink struct token to 12 bytes
Date: Wed, 05 Nov 2008 23:04:27 +0000 [thread overview]
Message-ID: <4912267B.1000305@tuffmail.co.uk> (raw)
In-Reply-To: <4911FA4F.2000900@tuffmail.co.uk>
Kay Sievers wrote:
> On Wed, Nov 5, 2008 at 20:55, Alan Jenkins <alan-jenkins@tuffmail.co.uk> wrote:
>
>> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
>>
>> diff --git a/udev/udev-rules.c b/udev/udev-rules.c
>>
>
> I liked the 16 byes, and now we can have only 255 keys per rule. :)
>
Hmm, that wasn't my intention. rule.token_count is a short so it should
be good for 64k. You'd hit the line buffer limit first.
> I get now with: "shrunk to 81012 bytes tokens (6751 * 12 bytes), 68009
> bytes buffer". Maybe we should check the duplicates in the strings and
> tail of strings while parsing, we can get rid of another 20kb, I
> guess. :)
>
Not sure about the O(n^2) scanning though. I tried a trie, but it's
100+ lines of dense C and needs a hundred K or so during parsing - it
just seemed like overkill. It did shave ~15K off my ~25K string
buffer. I can send it if you like.
next prev parent reply other threads:[~2008-11-05 23:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-05 19:55 [PATCH] udevd: Shrink struct token to 12 bytes Alan Jenkins
2008-11-05 22:30 ` Kay Sievers
2008-11-05 23:04 ` Alan Jenkins [this message]
2008-11-05 23:15 ` Kay Sievers
2008-11-11 20:14 ` Alan Jenkins
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=4912267B.1000305@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--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).