From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D45D859CA3 for ; Sun, 6 Mar 2016 11:06:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6525721C0C6 for ; Sun, 6 Mar 2016 11:06:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0162A21C003 for ; Sat, 5 Mar 2016 08:21:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7DA07340AC0 for ; Sat, 5 Mar 2016 08:21:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CAD3D16C5 for ; Sat, 5 Mar 2016 08:21:31 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1457165779.a0f48531213976c20190e61dea7100b190f5139f.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/porttree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a0f48531213976c20190e61dea7100b190f5139f X-VCS-Branch: master Date: Sat, 5 Mar 2016 08:21:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 13e1749a-f6d2-47ad-b0a0-26fd8f6a6b06 X-Archives-Hash: eb44630f2536ee6808bb212d0060722d commit: a0f48531213976c20190e61dea7100b190f5139f Author: Zac Medico gentoo org> AuthorDate: Sat Mar 5 06:02:42 2016 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Mar 5 08:16:19 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a0f48531 portdbapi.aux_get: don't cache in memory unless frozen Fix the portdbapi aux_get method to cache metadata in memory only when the "frozen" flag has been set, so that applications do not consume more memory than necessary. This change does not affect depgraph performance, since depgraph caches the metadata separately (in Package instances). X-Gentoo-Bug: 576488 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=576488 Acked-by: Brian Dolbec gentoo.org> pym/portage/dbapi/porttree.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 23f3169..1f4374e 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -550,7 +550,7 @@ class portdbapi(dbapi): #finally, we look at our internal cache entry and return the requested data. returnme = [mydata.get(x, "") for x in mylist] - if cache_me: + if cache_me and self.frozen: aux_cache = {} for x in self._aux_cache_keys: aux_cache[x] = mydata.get(x, "") @@ -817,6 +817,7 @@ class portdbapi(dbapi): def melt(self): self.xcache = {} + self._aux_cache = {} self.frozen = 0 def xmatch(self,level,origdep,mydep=None,mykey=None,mylist=None):