You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently a default unit registry is instantiated on import. This takes 1s even if no unit ops are performed. For CLI operations this can make things sluggish.
Describe the solution you'd like
The unit registry is lazily initialised when the first unit operation is needed. ScmUnitRegistry would become a proxy to the underlying registry and control the initialisation.
Describe alternatives you've considered
Remove openscm_units.unit_registry.
The text was updated successfully, but these errors were encountered:
Sounds good. We currently lazy initialise the contexts so should also be possible with units...
I'm also still not sure if we're using pint correctly. At the moment, our custom transformations have to be defined from and to everything so pint's internal map is huge. I don't think that's how it works for SI units so maybe there's a possible optimisation there too.
Is your feature request related to a problem? Please describe.
Currently a default unit registry is instantiated on import. This takes 1s even if no unit ops are performed. For CLI operations this can make things sluggish.
Describe the solution you'd like
The unit registry is lazily initialised when the first unit operation is needed.
ScmUnitRegistry
would become a proxy to the underlying registry and control the initialisation.Describe alternatives you've considered
Remove
openscm_units.unit_registry
.The text was updated successfully, but these errors were encountered: