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

Don't create LocalField when using InProcess #1243

Merged
merged 12 commits into from
Oct 27, 2023
Merged

Conversation

ansys-akarcher
Copy link
Contributor

The Local field primary goal is to copy the data when a field is remote, and very costly to access, which is not the case when the DPF server is used InProcess.

For now I didn't find an impactful and minimal way to get faster on get_entity_data_* methods.

@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #1243 (4f562cd) into master (da3a0ea) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1243      +/-   ##
==========================================
+ Coverage   87.23%   87.29%   +0.05%     
==========================================
  Files          81       81              
  Lines        9223     9229       +6     
==========================================
+ Hits         8046     8056      +10     
+ Misses       1177     1173       -4     

@ansys-akarcher ansys-akarcher changed the title Attempt to lower entity data access cost Don't create LocalField when using InProcess Oct 26, 2023
Co-authored-by: Paul Profizi <100710998+PProfizi@users.noreply.github.com>
@@ -494,6 +494,12 @@ def _get_data(self, np_array=True):
def _set_data(self, data):
pass

def __enter__(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

@ansys-akarcher is that needed to do with statement?

Copy link
Contributor Author

@ansys-akarcher ansys-akarcher Oct 27, 2023

Choose a reason for hiding this comment

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

@cbellot000
__enter__ and __exit__ are indeed required as now as_local_field() may be returning either a Field Object or a LocalField (which was defining __enter__ and __exit__)

@ansys-akarcher ansys-akarcher merged commit d97f72f into master Oct 27, 2023
33 checks passed
@ansys-akarcher ansys-akarcher deleted the fix/minor_optim branch October 27, 2023 16:03
@PProfizi PProfizi added the bug Something isn't working label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants