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(-)
-------------------------------------------------------------------------------
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.
--
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
Ukrainian C++ developer, Debian APT contributor
Attachment:
signature.asc
Description: OpenPGP digital signature