Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.12.z] Add in the caching mechanism to the Satellite's api property #12772

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #12765

This should have always existed but was overlooked. It will dramatically decrease the amount of time it takes to access the api property since it doesn't need to be reconstructed each time the property is accessed.

Before

%timeit mysat.api.Host
3.62 ms ± 52.4 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

After

%timeit mysat.api.Host
189 ns ± 0.943 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

This should have always existed but was overlooked. It will dramatically
decrease the amount of time it takes to access the api property since
it doesn't need to be reconstructed each time the property is accessed.

Before
------
%timeit mysat.api.Host
3.62 ms ± 52.4 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)

After
-----
%timeit mysat.api.Host
189 ns ± 0.943 ns per loop (mean ± std. dev. of 7 runs, 10,000,000 loops each)

(cherry picked from commit b3d32b6)
@Satellite-QE Satellite-QE added 6.12.z Introduced in or relating directly to Satellite 6.12 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Sep 28, 2023
@Satellite-QE
Copy link
Collaborator Author

trigger: test-robottelo
pytest: -m build_sanity tests/foreman/

@JacobCallahan JacobCallahan merged commit 9498d3c into 6.12.z Sep 28, 2023
@JacobCallahan JacobCallahan deleted the cherry-pick-6.12.z-b3d32b6d7aa568f5532eaf02fba3a5f062c517a5 branch September 28, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants