From: Alexey Tourbin <at@altlinux.ru>
To: community@lists.altlinux.org
Subject: Re: [Comm] ps2pdf
Date: Wed, 3 Sep 2008 01:42:01 +0400
Message-ID: <20080902214200.GS6477@altlinux.org> (raw)
In-Reply-To: <20080902210726.GR6477@altlinux.org>
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
On Wed, Sep 03, 2008 at 01:07:26AM +0400, Alexey Tourbin wrote:
> On Wed, Sep 03, 2008 at 03:05:22AM +0700, Mikhail Gusarov wrote:
> > Twas brillig at 22:59:57 02.09.2008 UTC+03 when mike@osdn.org.ua did gyre and gimble:
> >
> > MS> Интересно, в чём проблема будет apt-file адаптировать...
> >
> > В том, что contents_index - аааахренительного размера. И даже понятно,
> > как его можно катастрофически сжать - сделать radix tree, но ни у кого
> > руки не дошли.
>
> Я как раз над этим думал, но что-то потерял интерес...
> http://git.altlinux.org/people/at/packages/path-trie.git
Тут ещё такое дело что кодироване указателями иногда ничего не даёт.
Напр. компонент "/usr" в строке занимает четыре байта, и укзатель тоже
занимает четыре байта, так что замена коротких компонентов пути на
указатель ничего не даёт. Более того, игра в указатели имеет подводную
часть -- malloc bookkeeping (malloc is not *that* free) и фрагментация
памяти.
К тому же как мы будем сериализовать этот trie? Berkeley DB
поддерживает только одноуровневое хранение ключ->значение.
На каждый ключ создается страница и т.д. А ведь как раз желательно,
чтобы частые проходы по одному и тому же пути имели какой-то эффект
на буферный кеш ОС (то есть чтобы не всасывать весь файл целиком,
а только e.g. /usr/bin).
Реально наверное лучше всего делать ключ %{DIRNAMES} а значение
сериализованный блоб %{BASENAMES} -> %{NAME}.
Тогда как раз получается постраничное попадание в зависимости от
каталога.
$ rpm -qa --qf '[%{FILENAMES} -> %{NAME}\n]' |perl -pe 's#(.*)/#$1\t#' |sort
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2008-09-02 21:42 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-02 5:16 Aleksander N.Gorohovski
2008-09-02 5:19 ` Denis G. Samsonenko
2008-09-02 5:27 ` Aleksander N.Gorohovski
2008-09-02 5:25 ` Дегтярёв Дмитрий
2008-09-02 5:27 ` Дегтярёв Дмитрий
2008-09-02 5:33 ` Aleksander N.Gorohovski
2008-09-02 5:41 ` Дегтярёв Дмитрий
2008-09-02 5:44 ` Дегтярёв Дмитрий
2008-09-02 6:05 ` Aleksander N.Gorohovski
2008-09-02 6:28 ` Дегтярёв Дмитрий
2008-09-02 11:13 ` Aleksander N. Gorohovski
2008-09-02 8:06 ` Yury Aliaev
2008-09-02 19:27 ` Michael Shigorin
2008-09-02 19:31 ` Andrey Rahmatullin
2008-09-02 19:59 ` Michael Shigorin
2008-09-02 20:05 ` Mikhail Gusarov
2008-09-02 21:07 ` Alexey Tourbin
2008-09-02 21:42 ` Alexey Tourbin [this message]
2008-09-02 21:53 ` Mikhail Gusarov
2008-09-03 20:14 ` [Comm] apt-file Michael Shigorin
2008-09-03 20:16 ` Mikhail Gusarov
2008-09-02 21:21 ` Michael Shigorin
2008-09-02 21:45 ` Alexey Tourbin
2008-09-03 3:54 ` Andrey Rahmatullin
2008-09-03 6:54 ` Yury Aliaev
2008-09-03 20:18 ` Michael Shigorin
2008-09-03 6:45 ` [Comm] ps2pdf Yury Aliaev
2008-09-02 18:07 ` Denis Kirienko
2008-09-02 19:52 ` Aleksander N.Gorohovski
2008-09-02 20:35 ` Denis Kirienko
2008-09-02 8:33 ` Alexey I. Froloff
2008-09-02 10:37 ` Aleksander N. Gorohovski
2008-09-02 11:58 ` Yury Aliaev
2008-09-02 11:51 ` Aleksander N. Gorohovski
2008-09-02 19:25 ` Michael Shigorin
2008-09-02 19:33 ` Andrey Rahmatullin
2008-09-02 19:58 ` Michael Shigorin
2008-09-02 20:20 ` Alexey I. Froloff
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=20080902214200.GS6477@altlinux.org \
--to=at@altlinux.ru \
--cc=community@lists.altlinux.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
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git