Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
minor perf
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Jan 18, 2024
1 parent b61ed8a commit 8f01205
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions griffon/services/core_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def execute(self, status=None) -> dict:

def async_retrieve_sources(self, purl):
params = {
"limit": 200,
"limit": 120,
"root_components": "True",
"provides": purl,
"include_fields": "type,nvr,purl,name,version,namespace,download_url,related_url",
Expand All @@ -230,7 +230,7 @@ def async_retrieve_sources(self, purl):

def async_retrieve_upstreams(self, purl):
params = {
"limit": 200,
"limit": 120,
"root_components": "True",
"upstreams": purl,
"include_fields": "type,nvr,purl,name,version,namespace,download_url,related_url",
Expand All @@ -244,7 +244,7 @@ def async_retrieve_upstreams(self, purl):

def async_retrieve_provides(self, urlparams, purl):
params = {
"limit": 200,
"limit": 120,
"sources": purl,
"include_fields": "type,arch,nvr,purl,version,name,namespace,download_url,related_url",
}
Expand All @@ -267,9 +267,9 @@ def async_retrieve_provides(self, urlparams, purl):

def process_component(session, urlparams, c):
"""perform any neccessary sub retrievals."""
if c.sources:
c.sources = async_retrieve_sources(session, c.purl)
c.upstreams = async_retrieve_upstreams(session, c.purl)
# if c.sources:
# c.sources = async_retrieve_sources(session, c.purl)
# c.upstreams = async_retrieve_upstreams(session, c.purl)
c.provides = async_retrieve_provides(session, urlparams, c.purl)
return c

Expand Down Expand Up @@ -336,7 +336,7 @@ def execute(self, status=None) -> List[Dict[str, Any]]:
status.update("searching component-registry.")
results = []
params = {
"limit": 120,
"limit": 50,
"include_fields": "purl,type,name,related_url,namespace,software_build,nvr,release,version,arch,product_streams.product_versions,product_streams.name,product_streams.ofuri,product_streams.active,product_streams.exclude_components", # noqa
}

Expand Down Expand Up @@ -407,7 +407,6 @@ def execute(self, status=None) -> List[Dict[str, Any]]:
search_provides_params["active_streams"] = "True"
if self.exclude_unreleased:
search_provides_params["released_components"] = "True"
search_provides_params["root_components"] = "True"
search_provides_params["latest_components_by_streams"] = "True"
status.update("searching latest provided child component(s).")
latest_components_cnt = self.corgi_session.components.count(**search_provides_params)
Expand Down

0 comments on commit 8f01205

Please sign in to comment.