On Sun, Nov 30, 2008 at 01:45:57PM +0200, Eugene V. Lyubimkin wrote: > Hello! > > After some time of programming I've produced proof-of-concept patch of working apt without > any mmap's. > > Results: > > $ diffstat cur.patch > [snip] > 28 files changed, 668 insertions(+), 1456 deletions(-) > Nice code reduction. > ------------------------------------------------------------------------------- > Command Time elapsed (0.7.19) Time elapsed (nommap) > ------------------------------------------------------------------------------- > apt-get install abcde 2.50s 1.16s > apt-cache search --names-only "a?w. 0.20s 0.86s > {1,2}pe" > apt-cache search "a?w.{1,2}pe" 1.44s 1.47s > apt-cache show mutt 0.05s 0.76s > apt-cache rdepends qtgui4 0.13s 0.83s > apt-cache gencaches 1.02s -- > ------------------------------------------------------------------------------- > > Advantages: > - MMap and DynamicMMap have gone, so APT::Cache-Limit too; > - No pkgcache.bin and pkgsrccache.bin (-24 Mb of space on my machine); > - faster work with cache (all indirections have gone away too), > so all programs that actively use cache should work noticeably faster > (e.g. apt-get and other package managers); > - pkgCache is almost type-safe. > > Disadvantages: > - APT must rebuild its cache on each invocation. This means that any command > that use cache should build cache before actual work, which takes some time. > It's a time penalty for small queries via apt-cache. > > Question is can we take this approach for apt 0.8.x or not. Comments appreciated. > You only analyzed the speed part of your changes, which is amazing. But, what about the memory/resources used? -- http://syx.googlecode.com - Smalltalk YX http://lethalman.blogspot.com - Thoughts about computer technologies http://www.debian.org - The Universal Operating System
Attachment:
signature.asc
Description: Digital signature