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

Optimize XML parsing in loops #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ekohl
Copy link
Contributor

@ekohl ekohl commented Dec 22, 2024

In various places the XML is parsed over and over again. This replaces the use of xml_element and xml_elements with better alternatives. It also removes unused requires from the util class, reducing it to just random name generation.

This refactors the method so it only parses the XML once instead of 4
times. It adds basic tests to avoid regressions.
This uses the Nokogiri feature to directly query an attribute by its
path to avoid needing to retrieve it.

Especially in list_domains this avoids the need to parse the same XML
over and over again.
@ekohl ekohl force-pushed the reduce-util-class branch from f5e6927 to 18dc35a Compare December 29, 2024 00:17
@ekohl ekohl marked this pull request as ready for review December 29, 2024 00:17
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.

1 participant