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

Only load patch table when needed #1366

Closed
schlafly opened this issue Aug 15, 2024 · 0 comments · Fixed by #1367
Closed

Only load patch table when needed #1366

schlafly opened this issue Aug 15, 2024 · 0 comments · Fixed by #1367

Comments

@schlafly
Copy link
Collaborator

Currently the patch table is loaded whenever romancal is loaded, including for things like the ELP which do not use the patch table. The loading occurs whenever the module is imported.
https://github.com/spacetelescope/romancal/blob/main/romancal/patch_match/patch_match.py#L255

I believe the module is loaded whenever either pipeline is used, since the pipeline module pulls in the names of both steps.

from .exposure_pipeline import ExposurePipeline
from .mosaic_pipeline import MosaicPipeline

We should instead only load the patch table when something actually uses it. I noticed this at the moment since I have a slow connection to /grp and couldn't figure out why it was taking a half hour to do something like strun roman_elp -h; unsetting PATCH_TABLE_PATH led this to instead only take a few seconds.

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 a pull request may close this issue.

1 participant