Gentoo Archives: gentoo-amd64

From: Billy Holmes <billy@××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] dig package
Date: Thu, 27 Oct 2005 15:44:28
Message-Id: 4360F5FD.5090202@gonoph.net
In Reply to: Re: [gentoo-amd64] dig package by John Myers
1 John Myers wrote:
2 >>if you broke up the path in another table, and referenced that to the
3 >>basename, you could probably save lots of space - especially since most
4 > It would save a lot of space proportional to the number of unique filenames,
5 > but it wouln't really matter in practice. Each filename is only ever stored
6 > once, so over time, the largest tables are actually going to be the unique
7 > files table and the file->install map. It would also require many more
8 > queries to execute
9
10 it will matter greatly, here is a simple script to show you:
11
12 $ /usr/lib/gentoolkit/bin/qpkg -nc -l kdebase-3.4 | wc -c
13 255050
14
15 $ /usr/lib/gentoolkit/bin/qpkg -nc -l kdebase-3.4 | perl -n \
16 -MFile::Basename -e 'next unless /^\//; s/->.*//; push(@{$f{dirname
17 $_}},basename $_); END{map { print "$_\n"; map { print "\t$_"; }
18 @{$f{$_}}} sort {$a cmp $b} keys %f};' | wc -c
19 99327
20
21 That's a ~62% savings. You can use a medium INT to reference the
22 pathname, and then use inner joins in your queries.
23 --
24 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] dig package Richard Freeman <rich@××××××××××××××.net>