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

Create a memoization decorator for relevant calls #3117

Open
pshriwise opened this issue Aug 15, 2024 · 0 comments
Open

Create a memoization decorator for relevant calls #3117

pshriwise opened this issue Aug 15, 2024 · 0 comments

Comments

@pshriwise
Copy link
Contributor

pshriwise commented Aug 15, 2024

Description

The Geometry, Cell, Universe, and Material (maybe others too) use a memoization to accelerate searches for contained cells, universe, materials, etc. As a result, there is a lot of repeated code related to managing the memo object throughout. I believe a decorator for the relevant methods could be used to reduce the boilerplate involved w/ these calls.

Alternatives

Leave it alone

Compatibility

No compatibility issues w/ this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant