This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
find_repo_content_units: skip db query if expected result is empty (#…
…4008) * find_repo_content_units: skip db query if expected result is empty For performance reasons, this change does server-side counting of units that are expected to be in result before actual db query happens. If expected count is zero, skip db query and continue to the next chunk of unit ids. The performance problem is noticable in RHSM-pulp for big repos with 200k and more units associated. During associate action results of the most of queries in affected code will be empty so we can skip querying the db this way. Without this fix, code will do eg. 200 unnecesary queries for repo with 200k units which will take a lot time to finish that leads to major performance regression.
- Loading branch information