Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 634210 - sys-apps/portage: portdbapi performance scales poorly for a large number of repositories
Summary: sys-apps/portage: portdbapi performance scales poorly for a large number of r...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 240187 835380 631448
  Show dependency tree
 
Reported: 2017-10-14 04:28 UTC by Zac Medico
Modified: 2023-06-14 01:25 UTC (History)
1 user (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 2017-10-14 04:28:35 UTC
Portage code should avoid iterating over all repositories when possible. For example, this pull request implements of cache of catpkg to repository mappings in order to optimize iteration over repositories:

https://github.com/gentoo/portage/pull/218
Comment 1 Larry the Git Cow gentoo-dev 2017-10-14 04:49:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=8b1f9dbd925ccf9c23909116c56eaa4d4f996474

commit 8b1f9dbd925ccf9c23909116c56eaa4d4f996474
Author:     Daniel Robbins <drobbins@funtoo.org>
AuthorDate: 2017-10-13 21:33:19 +0000
Commit:     Zac Medico <zmedico@gentoo.org>
CommitDate: 2017-10-14 04:44:29 +0000

    portdbapi: cache catpkg to repository mappings
    
    In order to avoid performance problems as the number
    of repositories increases, use a cache of catpkg to
    repository mappings to optimize findname2, cp_list,
    and getRepositories methods.
    
    Bug: https://bugs.gentoo.org/634210
    Closes: https://github.com/gentoo/portage/pull/218

 NEWS                          |   7 +++
 RELEASE-NOTES                 |   6 +++
 pym/_emerge/depgraph.py       |   4 +-
 pym/portage/dbapi/porttree.py | 103 +++++++++++++++++++++++++++++++++++++-----
 4 files changed, 107 insertions(+), 13 deletions(-)}