-
Notifications
You must be signed in to change notification settings - Fork 31
refactor: Move ParticleSvc to services library and separate interface from implementation #2032
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
base: main
Are you sure you want to change the base?
Conversation
…implementation Co-authored-by: wdconinc <[email protected]>
inline static const ParticleMap kParticleMap
inside src/algorithms/interfaces/ParticleSvc.h is not in...for more information, see https://pre-commit.ci
Co-authored-by: wdconinc <[email protected]>
for more information, see https://pre-commit.ci
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.
@copilot Please sort the headers such that the new services/particle/ParticleSvc.h
header comes alphabetically after the other listed headers in algorithms/
.
… from implementation (fix: iwyu) (#2033) This PR applies the include-what-you-use fixes as suggested by https://github.com/eic/EICrecon/actions/runs/17157891534. Please merge this PR into the branch `copilot/fix-24a45d04-d181-469d-854f-d54ba58ad148` to resolve failures in PR #2032. Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ter algorithms/ headers Co-authored-by: wdconinc <[email protected]>
Sorted headers alphabetically so that |
Briefly, what does this PR introduce?
This PR addresses issue #1951 by refactoring the ParticleSvc to significantly improve compilation performance while moving the service to the appropriate location in the codebase. The large
kParticleMap
(250+ particle entries) has been moved from the header file to a separate implementation file, eliminating the need for GCC compilation pragmas and reducing header bloat.Problem Statement
The current
ParticleSvc.h
contains a largeinline static const ParticleMap kParticleMap
with 250+ particle definitions that gets included in every downstream compilation unit. This significantly slows compilation, requiring GCC pragmas as a workaround:Solution
Architectural Changes:
src/algorithms/interfaces/
tosrc/services/particle/
Before (297 lines):
After (40 lines header + 268 lines implementation):
Performance Impact
API Compatibility
✅ Zero breaking changes - maintains identical public interface
✅ Backward compatibility - old include path forwards to new location
✅ Same functionality - all existing behavior preserved
Files Changed
New Structure:
Updated Dependencies:
particle_service_library
dependencyMigration Path
Immediate: No action required - backward compatibility maintained via forwarding header
Recommended: Update includes from:
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes?
No. Full backward compatibility is maintained through a forwarding header at the original location.
Does this PR change default behavior?
No. All existing functionality and behavior is preserved exactly as before.
Result: This refactoring successfully eliminates the large particle map from downstream compilation units while moving ParticleSvc to the services library as requested, providing significant compilation performance improvements without any breaking changes.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.