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

PERF: Reduce number of times findall is called on XML file #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

greglucas
Copy link
Collaborator

The parameter types and parameters can be read through once and loaded into a cache straight away and then the lookups done on the cache after that. This prevents a findall() call iterating through the entire XML document every time a new parameter is found.

Profiling with the script provided in #112, we go from 12s to 0.03s for the Definition creation.

closes #112

Checklist

  • Changes are fully implemented without dangling issues or TODO items

The parameter types and parameters can be read through once and
loaded into a cache straight away and then the lookups done on
the cache after that. This prevents a findall() call iterating through
the entire XML document every time a new parameter is found.
@greglucas greglucas requested a review from medley56 as a code owner November 10, 2024 03:17
@greglucas
Copy link
Collaborator Author

Ping for a review here. I think this would really help IMAP as some of those XTCE files can be quite large and this should really speed up initial parsing without change in functionality.

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.

Reading the XTCE file slower than parsing
1 participant