-
Notifications
You must be signed in to change notification settings - Fork 142
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
Lazy load of parametrics, setups and optimizations #4366
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of not doing things eagerly but lazily. I would even enforce doing it by default and not using a flag to activate it.
Just a quick question, should one of the attributes _setups
, _parametrics
or _optimizations
change after it has been set once ? If no, e.g. the Analysis is always done as post processing and nothing should change, ignore my comment. Else, the implementation should be updated as it does not allow for value modification.
# Conflicts: # pyaedt/modeler/cad/Primitives.py
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4366 +/- ##
==========================================
- Coverage 81.59% 81.58% -0.02%
==========================================
Files 107 107
Lines 52465 52489 +24
==========================================
+ Hits 42810 42822 +12
- Misses 9655 9667 +12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job with this refactoring !
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
I had to add these 3 properties to the lazy load because, for Big project, it takes time to load the objects. If they are needed later, it will take the same previous time to load the objects.