Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 529660 - sys-apps/portage: performance optimization: memoize use_reduce results for _slot_operator_update_probe
Summary: sys-apps/portage: performance optimization: memoize use_reduce results for _s...
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: http://thread.gmane.org/gmane.linux.g...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 155723
  Show dependency tree
 
Reported: 2014-11-18 06:41 UTC by Zac Medico
Modified: 2014-12-04 10:39 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-18 06:41:23 UTC
Profiling has shown that depgraph._slot_operator_update_probe is repeating the same use_reduce calls for the same package. I have a patch which implements memoization of use_reduce results for this function, and it significantly improves performance of dependency calculations. With memoization, 'emerge -puvDN @world' on one of my computers takes 22.4% less time, and results in 13.5% fewer use_reduce calls.
Comment 1 Zac Medico gentoo-dev 2014-11-18 06:59:49 UTC
My patch is in the following branch:

	https://github.com/zmedico/portage/tree/bug_529660

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4814
Comment 2 Zac Medico gentoo-dev 2014-11-24 08:23:15 UTC
This is in the master branch:

https://github.com/gentoo/portage/commit/9ba4f2aa6a2755a73fb652b4557919047d649fd1
Comment 3 Andrew Savchenko gentoo-dev 2014-12-04 10:39:09 UTC
Apparently this patch is in 2.2.15.
Thanks!