Hello, On Tue, 24 Oct 2006, Michel Lespinasse wrote: > "dselect select" seems to take about 48 MB while displaying the > packages, this causes a small-memory system (32MB) to go heavily into > swap. > > A quick run with valgrind --tool=massif reveals that about 15MB are > allocated by 'newpad'. Apparently dselect creates a 20000-line ncursed > pad to hold the package list. Since the same information is also present > as part of the in-memory package database, it might be possible to save > the memory by generating a smaller pad for just the part of the list > that's being shown at any given time.
This change is reasonable IMO. I updated the patch and pushed it here: http://git.debian.org/?p=users/hertzog/dpkg.git;a=shortlog;h=refs/heads/pu/bug395140-dselect-memory-usage I tested it and it works fine apparently. I'll merge it if nobody expresses any concern. On Fri, 27 Oct 2006, Michel Lespinasse wrote: > The attached patch helps with low-memory performance by implementing > segregated memory storage. A separate obstack is used for allocating > information related to the Installed-Size, Origin, Maintainer, Bugs, > Architecture, Source, Filename, Size, MD5sum, MSDOS-Filename and > Description fields, as well as any arbitrary field contents > (which these days seems to include SHA1, SHA256, Tag and Task fields). I don't think that we want such a change. It will apply both to dselect and to dpkg, and it's probably not desirable in general. It would be fine-tuning generic code for a specific use case and that doesn't make sense. On Sat, 28 Oct 2006, Michel Lespinasse wrote: > This change reworks parse.c to avoid mmapping the entire file, which reduces > memory usage by up to 20MB when parsing the available file. This patch will also not be merged IMO. We have some other patches/branches that will change the parsing code to be a flex-based parser and this should resolve this concern too. Thanks for the work and analysis anyway! Cheers, -- Raphaël Hertzog Le best-seller français mis à jour pour Debian Etch : http://www.ouaza.com/livre/admin-debian/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]