-
Notifications
You must be signed in to change notification settings - Fork 168
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
refactor: Do not allocate memory if the surface is connected with a detector el… #3069
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3069 +/- ##
==========================================
- Coverage 47.65% 47.64% -0.01%
==========================================
Files 507 507
Lines 29205 29211 +6
Branches 14010 14012 +2
==========================================
+ Hits 13917 13919 +2
- Misses 5264 5265 +1
- Partials 10024 10027 +3 ☔ View full report in Codecov by Sentry. |
📊: Physics performance monitoring for d49e825physmon summary
|
This is what we used to have before. I think @asalzburger at some point measured that having the transform locally improved performance. But I forget the details. |
Hmm, the transform is never used if the detector element is present.... Confused, I am |
The transform is only used for surfaces which don't have a detector element. Otherwise the transform is retrieved from the detector element, and that's where for example the alignment is handled. |
Yep, that what I'm saying too ;) |
So for all other surfaces, boundaries etc, the transform is accessed locally. |
Hi, yes I remember that there was a visible (but small performance change), however, we can just see with this PR if this is still a measurable effect? |
I could imagine that this is an additional cache miss because of the additional indirection. After measuring this we would have to weight the CPU increase against the MEM decrease |
003d6dd
to
6a305dc
Compare
Results from the propagation test on 3 threads patched:
main:
|
@junggjo9 @paulgessinger @asalzburger @andiwand |
Co-authored-by: Andreas Stefl <[email protected]>
Co-authored-by: Andreas Stefl <[email protected]>
Co-authored-by: Andreas Stefl <[email protected]>
There are a couple of CI failure
|
Co-authored-by: Andreas Stefl <[email protected]>
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.
lgtm 👍
Quality Gate passedIssues Measures |
If the surface has an associated detector element its internal transform is never accessed consuming memory for no-reason. If the transform is a unique_ptr which is released in such cases, the footprint should be reduced