1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-12-22 17:14:16 +02:00
wernermisc/qpkg/TODO
Werner Almesberger e1814ce372 qpkg: converted dumb binary trees to red-black trees (in progress)
This is a change of the underlying mechanism but it's not polished or
optimized yet. The compare functions haven't been updated, so they work
but produce compiler warnings because of type mismatches.

- Makefile (OBJS): added jrb.o
- id.h, id.c: use jrb instead of own dumb binary trees
- TODO: brag about the efficiency improvement
2010-11-19 21:53:38 -03:00

36 lines
1.2 KiB
Plaintext

- optimize the search trees. Right now, we have 81812 calls to make_id
for 14601 packages, resulting in 7420560 calls to comp_id.
There can be at most 2 new identifiers per package (package name and
version), so a perfectly balanced tree should have a depth of no more
than 14. If we assume that each call to make_id searches to the bottom,
we'd get 1145368 calls to comp_id, about 15% of the current number.
So the tree is clearly degenerated.
Update: after switching to red-black trees, we get only 1497604 calls
to comp_id. This is 130% of the "good case" estimate above. Insertion
of a new node is currently done with two lookup, so we'll get rid of
some more lookups after further optimization.
- check whether introducing a new package would cause a conflict
- compile the list of conflicts of installed packages
- handle Provides:
- if there are multiple choices, try to prefer more recent versions
- sort prerequisites such that they can be installed in the specified order
- consider Architecture:
- what to do with explicit and implicit replacement ?
- if we can't resolve the prerequisites, give at least a hint of what one
can do to improve the situation
- check database for internal consistency
- implement keyword search