Skip to content

Various hosts perform expensive operations during import #179

@rfrenchseti

Description

@rfrenchseti

Some of the hosts perform operations during import that could take a significant amount of time and/or require external files. When the SPICE kernels are not stored locally and must be cached from a remote source, doing any operation with the kernels may involve lengthy remote copy operations. There should never be expensive operations during a plain import. This not only potentially requires downloading files that aren't actually going to be used, but also significantly slows down test discovery during unit testing, since all of the modules are imported at that time. Such operations should be performed inside of class initialization or in other guarded locations.

Examples:

  • cassini/__init__.py calls oops.spice.load_leap_seconds()
  • newhorizons/lorri.py calls LORRI.initialize() which ends up loading a bunch of SPICE kernels
  • voyager/iss.py calls ISS.initialize() which ends up loading a bunch of SPICE kernels

There may be others.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions