Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 576488

Summary: sys-apps/portage: portdbapi should not cache metadata in memory unless the "frozen" flag has been set
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: CoreAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: 2.2   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 573774    

Description Zac Medico gentoo-dev 2016-03-05 06:01:42 UTC
The portdbapi aux_get method aggressively caches metadata in memory. This behavior can cause applications to consume much more memory than necessary. It would make sense for the aggressive cache behavior to be enabled by the existing "frozen" flag, so that it is disabled by default. Doing so will not affect depgraph performance, since depgraph caches the metadata separately, via Package instances.
Comment 1 Zac Medico gentoo-dev 2016-03-05 07:59:17 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_576488
Comment 2 Brian Dolbec (RETIRED) gentoo-dev 2016-03-05 08:05:11 UTC
Looks, good.  If only all patches were that simple ;)
Comment 3 Zac Medico gentoo-dev 2016-03-05 08:25:21 UTC
Thanks, this is in the master branch:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=a0f48531213976c20190e61dea7100b190f5139f
Comment 4 Zac Medico gentoo-dev 2016-03-14 03:13:09 UTC
Fixed in 2.2.28.