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

Re: dpkg and sqlite redux



sean finney writes ("dpkg and sqlite redux"):
> something like sqlite would give the benefit of not only a smarter way
> of storing the data but also it would lower the complexity of the
> datastructures needed to work with the data, since much of the overhead
> could be shifted into cleverly crafted queries.  

IME attempts to use relational databases for things for which they're
not well-suited (and this is one of them) usually make things more
complex rather than simpler.

You replace the code which directly implements the required data
structures and algorithms with two bodies of code to (a) implement the
relational database (this is very nontrivial) and (b) do impedance
matching between the db interface and the controlling code (including
the `clever queries' you speak of).

> i don't have the numbers to back it up, but i do think it is a rather
> inefficient format.  fwiw, i've tried compiling dpkg with profiling
> info enabled (-pg), but this causes it to exit with SIGPROF while
> scanning the list files (profiling timer times out)...  does anyone have
> a better way to profile various dpkg runs better than /usr/bin/time?

Many years ago I profiled dpkg successfully with gprof.

Ian.



Reply to: