feat: improving performance of save_selection#3697
Merged
Conversation
Contributor
|
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
…ithub.com/ansys/pymapdl into feat/improving-save_selection-performance
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3697 +/- ##
==========================================
- Coverage 87.14% 87.09% -0.06%
==========================================
Files 187 187
Lines 14697 14709 +12
==========================================
+ Hits 12808 12811 +3
- Misses 1889 1898 +9 |
Collaborator
Author
|
@pyansys-ci-bot LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
As the title. By using components instead of retrieving all entity ids, we speed up the process.
Previous implementation used
XSELfunctions to set the retrieved ids of the entities. While this was OK, it incurs in performance penalization because it has to write a file (sometimes quite big), transfer it and run it usingnon_interactive. Because of the amount ofXSEL,A,...lines, this might posed a problem with the infamous gRPC instability (#3313).I think the thorough testing should be sufficient to ensure we do not hit issues like #3372 or #2452
However can @mikerife have a look at the
test_save_selection_2code and see if I am missing something?Benchmark
Testing code is
test_save_selection_2.Issue linked
Close #3695
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)