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

Time, Scheduler: cache creation of pint unit_registry Units #92

Merged
merged 1 commit into from
Apr 6, 2023
Merged

Conversation

kmantel
Copy link
Owner

@kmantel kmantel commented Feb 10, 2023

Each call to getattr on a pint unit_registry creates new instances of Unit, and this becomes a significant time cost compared even to deepcopying

@coveralls
Copy link

coveralls commented Feb 10, 2023

Coverage Status

Coverage: 92.475% (+0.02%) from 92.455% when pulling f561b6b on dev into c7acbe9 on main.

Each call to getattr on a pint unit_registry creates new instances of
Unit, and this becomes a significant time cost compared even to
deepcopying
@kmantel kmantel changed the title Time, Scheduler: cache calls to pint unit_registry Time, Scheduler: cache creation of pint unit_registry Units Feb 14, 2023
@kmantel
Copy link
Owner Author

kmantel commented Feb 15, 2023

Consider the outcome of hgrecco/pint#1713 before merging

@kmantel
Copy link
Owner Author

kmantel commented Apr 6, 2023

Consider the outcome of hgrecco/pint#1713 before merging

Unknown when/whether this issue will be resolved. If it is, this PR can be reverted.

@kmantel kmantel merged commit 8842776 into main Apr 6, 2023
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

Successfully merging this pull request may close these issues.

2 participants