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

Refactor the YumFinder #38

Merged
merged 2 commits into from
Sep 6, 2023
Merged

Refactor the YumFinder #38

merged 2 commits into from
Sep 6, 2023

Conversation

0xDEC0DE
Copy link
Collaborator

@0xDEC0DE 0xDEC0DE commented Sep 6, 2023

Implement our own XML fetch/parse routines for consuming repomd data, and create a simple lookup dict from the results rather than trying to shoehorn in use of the repomd.findall library call.

This yields a 30%-50% speedup in the functional tests.


This change is Reviewable

@0xDEC0DE 0xDEC0DE requested a review from juledwar September 6, 2023 02:29
@0xDEC0DE 0xDEC0DE marked this pull request as draft September 6, 2023 02:43
Implement our own XML fetch/parse routines for consuming repomd
data, and create a simple lookup dict from the results rather than
trying to shoehorn in use of the `repomd.findall` library call.

This yields a 30%-50% speedup in the functional tests.
@0xDEC0DE 0xDEC0DE marked this pull request as ready for review September 6, 2023 17:13
@0xDEC0DE
Copy link
Collaborator Author

0xDEC0DE commented Sep 6, 2023

BEFORE

Ran: 14 tests in 117.5138 sec.
 - Passed: 14
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 358.7881 sec.

AFTER

Ran: 14 tests in 88.0651 sec.
 - Passed: 14
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 218.6572 sec.

Stepping through the refactored workflow showed that the YumFinder was
deep-copying a dict into a subprocess, looking up a value, and
returning the result.  Surely, there must be a better way.
Copy link
Collaborator Author

@0xDEC0DE 0xDEC0DE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @juledwar)

Copy link
Owner

@juledwar juledwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @0xDEC0DE)

@juledwar juledwar merged commit 6bd3731 into master Sep 6, 2023
@juledwar juledwar deleted the un-etree branch September 6, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants