Kay Sievers wrote:
On Wed, Nov 5, 2008 at 20:55, Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx> wrote:
Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>
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.
--
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