Skip to content

Lazy initialise registry #37

Description

@lewisjared

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions