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

Re: dpkg and sqlite... ...?



sean finney wrote:
 > yeah.  my thoughts were that one could start with some of the simpler
> info that i mentioned earlier, but it could be later be expanded to
> include pretty much everything.
> 
> anyway, i've thrown together a small proof of concept to show the basic
> idea of what i'm getting at:
> 
> http://people.debian.org/~seanius/dpkg-sqlite/
> 
> and tarball:
> 
> http://people.debian.org/~seanius/dpkg-sqlite.tgz
> 
> 
> from README:
> 
> this is a quick proof-of-concept to illustrate the idea of using
> something like sqlite3 for caching various dpkg data.
> 
> to try it out, you ought to just be able to run "make", assuming you
> have the sqlite3 development libraries available.

I have checked it out, very nice, besides missing a -ldl flag, everything went
according to plan. The speed is simply amazing, here is a small benchmark I did
on my machine:

omega3:/home/joe/build/dpkg-sqlite# echo 1 > /proc/sys/vm/drop_caches
omega3:/home/joe/build/dpkg-sqlite# time dpkg -S /usr/bin/gcc
gcc: /usr/bin/gcc

real    0m4.778s
user    0m0.252s
sys     0m0.152s
omega3:/home/joe/build/dpkg-sqlite# echo 1 > /proc/sys/vm/drop_caches
omega3:/home/joe/build/dpkg-sqlite# time ./poc /usr/bin/gcc
querying as if listing package /usr/bin/gcc:
querying as if for owner of file /usr/bin/gcc:
gcc: /usr/bin/gcc

real    0m1.306s
user    0m0.240s
sys     0m0.096s
omega3:/home/joe/build/dpkg-sqlite#

The difference is drastic. One of the main concerns now is reliability. Does
anyone here know of any SQLite horror stories they might like to share ?



Reply to: