details=True can be very slow. It causes huge amounts of processing
and we don't use the results. Using ?distributors=True&importers=True
instead is much faster.
I've got repos where ?distributors=True&importers=True returns in around
a second whilst details=True took > 4 minutes (testing the REST API
manually with curl).
The returned json (for an RPM repo) is missing just 2 fields compared to
details=True. These are:
This change has been tested with pulp_rpmrepo only, but I think should
also be fine with the two other providers (pulp_isorepo and
pulp_puppetrepo).
My puppet runs had started failing most times, and sucessful runs were
taking around 10 minutes. After this fix, puppet runs are now less than
a minute.
In my environment,
get_repo_info
was failing with...details=True
can be very slow. It causes huge amounts of processing and we don't use the results. Using?distributors=True&importers=True
instead is much faster.I've got repos where
?distributors=True&importers=True
returns in around a second whilstdetails=True
took > 4 minutes (testing the REST API manually with curl).The returned json (for an RPM repo) is missing just 2 fields compared to
details=True
. These are:locally_stored_units
total_repository_units
See https://docs.pulpproject.org/dev-guide/integration/rest-api/repo/retrieval.html#retrieve-a-single-repository
This change has been tested with
pulp_rpmrepo
only, but I think should also be fine with the two other providers (pulp_isorepo
andpulp_puppetrepo
).My puppet runs had started failing most times, and sucessful runs were taking around 10 minutes. After this fix, puppet runs are now less than a minute.