Bug 1296657

Summary: dnf-plugins-core version of repoquery with --resolve much slower than yum-utils
Product: [Fedora] Fedora Reporter: John Hein <txn2tahx3v>
Component: dnf-plugins-coreAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, mluscon, packaging-team-maint, pnemade, RadekHolyPublic, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-11 13:11:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Hein 2016-01-07 18:44:36 UTC
Description of problem:

old way with yum-utils: repoquery --requires --resolve <some_pkg>
new way with dnf-plugins-core: dnf repoquery --requires --resolve <some_pkg>

Version-Release number of selected component (if applicable):

fedora 22

% rpm -qa | egrep 'yum-utils|dnf-plugins-core'
dnf-plugins-core-0.1.15-1.fc22.noarch
yum-utils-1.1.31-508.fc22.noarch
python-dnf-plugins-core-0.1.15-1.fc22.noarch


How reproducible:

always

Steps to Reproduce:

Compare wall time to run yum-utils' repoquery vs. dnf-plugins-core:

example:

sh -c 'time repoquery --requires --resolve gscan2pdf'
  .
  .
real    0m4.316s
user    0m4.064s
sys     0m0.249s

sh -c 'time dnf repoquery --requires --resolve gscan2pdf'
  .
  .
real    4m7.166s
user    4m3.422s
sys     0m3.731s

On both cases, the metadata cache was up to date before running the repoquery.

Without --resolve, the times are comparable (< 5 s).

Is this a difference due to fundamentally different issues between yum & dnf?  The magnitude of speed difference seems to be indicate than just 'python adds a little overhead'.

Hints to where to start profiling are appreciated - I currently have near zero internals knowledge for yum/dnf, but I'm willing to dig a little.

Comment 1 Honza Silhan 2016-01-11 13:11:46 UTC

*** This bug has been marked as a duplicate of bug 1279538 ***