Bug 1049205

Summary: [perf][rel-eng] force evaluation of Query and maintain the result map
Product: [Fedora] Fedora Reporter: Daniel Mach <dmach>
Component: hawkeyAssignee: Honza Silhan <jsilhan>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 22CC: jsilhan, jzeleny, packaging-team-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-22 17:36:18 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:
Bug Depends On:    
Bug Blocks: 578256, 1080837    

Description Daniel Mach 2014-01-07 08:29:10 UTC
I have a sack with packages of all possible arches.
I always run queries this way:
    q.filter(arch=[<supported arches>]).filter(...)
Running multiple queries is *very* slow due to the arch filtering.

I'd like to populate per-arch sacks.
In general, it would be nice to create a sack with user-defined content.

s = hawkey.Sack()

# populate with individual packages
s.add_packages([pkg, pkg, ...])

# populate with query results
s.add_packages(q.filter(arch=[<supported arches>])

Comment 2 Honza Silhan 2014-12-08 19:00:41 UTC
We rather speed up performance of Query. Adding `.save()` method that would compute and hold the result of the Query for later use. That would be easier to implement and more versatile for other use cases.

Comment 3 Daniel Mach 2014-12-10 10:46:01 UTC
Do you have any ETA for this change?
Hawkey performance issues are blocking Pungi yum->dnf transition for more than a year. In my use cases is hawkey roughly 5x slower than yum.

Comment 4 Honza Silhan 2014-12-11 19:57:51 UTC
no more than another year, I hope. It will be on my TODO list.

Comment 5 Jaroslav Reznik 2015-03-03 15:22:27 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22