[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ITP: auto-apt (automatic apt-get)

Joey Hess wrote:
> What I think you should do is talk to Jason Gunthorpe. I think Jason has been
> working on Contents file stuff for apt already, and has some stuff that
> can build a binary db in a few seconds (or at least in minute -- not half
> an hour). Clearly, if apt has support for loading contents files or some
> equivilant structure, it will be useful for auto-apt and lots of other things
> too. I think Jason had some ideas about effecient ways to pack Contents data
> into a db file.

Aha, see

+   The GenContents class is a back end for an archive contents generator. 
+   It takes a list of per-deb file name and merges it into a memory 
+   database of all previos output. This database is stored as a set
+   of binary trees linked across directories to form a tree of all files+dirs
+   given to it. The tree will also be sorted as it is built up thus 
+   removing the massive sort time overhead.
+   By breaking all the pathnames into components and storing them 
+   seperately a space savings is realized by not duplicating the string
+   over and over again. Ultimately this saving is sacrificed to storage of
+   the tree structure itself but the tree structure yeilds a speed gain
+   in the sorting and processing. Ultimately it takes about 5 seconds to
+   do 141000 nodes and about 5 meg of ram.
+   The tree looks something like:
+     usr/
+      / \             / libslang
+   bin/ lib/ --> libc6
+        /   \         \ libfoo
+   games/  sbin/
+   The ---> is the DirDown link

see shy jo

Reply to: