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

FrozenClass performance fix #452

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

brownbaerchen
Copy link
Contributor

In #437, I made the names the classes are allowed to have a class attribute of FrozenClass. Turns out there are a few issues.
Some convergence controllers added attributes in every step, leading to huge lists. This caused really poor performance. This PR includes a fix for that such that attributes are only ever added once, regardless of whether it is allowed or not.

However, since the allowed attributes are a class attribute of FrozenClass they are shared across all derived classes. And I didn't find a quick fix for that. It's not a huge problem. Basically, you add, for instance error_embedded_estimate to the status class of level and then you can set error_embedded_estimate for the status of the step as well. It's not nice. It doesn't really enforce what the frozen classes are about. I am sure there is a simple solution for this that I am just not able to see at the moment.

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.83%. Comparing base (18989d3) to head (2b81ea5).
Report is 32 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #452      +/-   ##
==========================================
+ Coverage   77.38%   77.83%   +0.44%     
==========================================
  Files         327      332       +5     
  Lines       26085    25844     -241     
==========================================
- Hits        20187    20115      -72     
+ Misses       5898     5729     -169     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brownbaerchen
Copy link
Contributor Author

What's the status of this? Anyone want to review / merge?

@pancetta pancetta merged commit 63c2b79 into Parallel-in-Time:master Jul 29, 2024
88 checks passed
brownbaerchen added a commit to brownbaerchen/pySDC that referenced this pull request Jul 29, 2024
* Fix for `FrozenClass` where attributes could be added multiple times.

* Didn't find a nice quick fix for attributes being added to all classes

* Fixed test

#!!!!!!!!!! WARNING: FLAKEHEAVEN FAILED !!!!!!!!!!: 
#:
@brownbaerchen brownbaerchen deleted the frozen_cls_fix branch August 8, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants