I've been hearing a bit lately about removing dependencies that are no longer needed for stable upgrade paths. The most common reason seems that this will make apt need less memory[1].
So then, someone must have measured the memory use. Unless this is a kind of premature optimation. But, I've not seen a citation of any such measurement. I can make a rough estimate: apt-cache stats suggests that the average dependency takes 29 bytes. If that estimate were right, then to save 100kb, which seems an easy minimum amount to care about, 3500 dependencies would have to be removed. On average, one package in ten would need to be modified. That's a lot of skull sweat. It's larger than all but the biggest transitions. It does not seem, to me, to be worthwhile to save 100 kb of ram. Perhaps others would disagree? But my estimate is *not* right. apt-get may show a RSS of 20 mb but 16 of that is mmaped cache files. So, removing a dependency probably saves closer to 0 bytes of memory than 20 bytes. Where then is the savings? It's not in Packages file download time; pdiff optimizes that away. It's not Package file bloat on the mirrors or on disk; the compressed text of *all* Dependency lines takes only some 500 kb on-disk. The main bloat seems to be 6 mb used in pkgcache.bin, and some amount of CPU time spent by apt-get update to parse the dependencies and populate the file. So, I've convinved myself this is probably a false optimisation. -- see shy jo [1] There are other reasons, including removing dependency cycles or avoiding pre-dependency complications. This is not the thread for those.
signature.asc
Description: Digital signature