Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 530010 - sys-apps/portage: performance optimization: selectively invalidate cache for _select_pkg_highest_available
Summary: sys-apps/portage: performance optimization: selectively invalidate cache for ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 155723 835380
  Show dependency tree
 
Reported: 2014-11-21 03:50 UTC by Zac Medico
Modified: 2023-06-14 01:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2014-11-21 03:50:38 UTC
The depgraph._select_pkg_highest_available method has a memoization cache, but the whole cache is discarded each time that a package is added to the graph. I have written a patch which selectively invalidates the cache, and it significantly improves performance of dependency calculations. On one of my computers, 'emerge -puvDN @world' 15% less time, and results in 58% fewer _select_pkg_highest_available_imp calls.
Comment 2 Zac Medico gentoo-dev 2014-11-24 08:24:08 UTC
This is in the master branch:

https://github.com/gentoo/portage/commit/5f0541c8739bd0342a94aa108e5101588eaefc16
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2014-12-04 05:37:38 UTC
This is in the portage-2.2.15 release.