>Well, yes, that's definitely not optimal. However, there are a couple of >things >to bear in mind: (1) the actual cost of this insanity is relatively >small (which >certainly surprised me), and (2) doing it this way allows certain >optimizations >elsewhere in the packaging system, so that doing it some other way has a >cost >that needs to be quantified. Handling a thousand separate files (as an >example) >involves more overhead than looking after just the one and - as >currently >structured - installing a package involves checking all the contents of >all >currently installed packages. Currently, that would be significantly >more >expensive than the current lunacy, although that doesn't have to be the >case.
A test I ran showed that a "cold" lookup in the contents file costs 100x less than the "cold" lookup in 1000 separate files; and that is really not surprising. As an estimate of the cost, run "pkginfo" twice. You'll find it takes 20-30 seconds the first time and only one the second. Conversely, "wc contents" takes about 1 second the first and second time. Since I feel package installation is a rare event, we really need to optimize for the standard operations and not the install/upgrade. The latter can be optimized in different ways. Casper
