Move imports in main so that '--help' returns much faster - #455
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
yeah, i figured lint would have a field day with this. not opposed to the change, but we might need to ignore some more linting. |
Signed-off-by: Andrew Collins <ancollin@redhat.com>
|
Yeah, good call. I have a less-invasive idea of simply putting the --help output in the readme, verbatim. Then we could keep it up to date in an automated way. |
Type of change
Description
orion --helptakes too long for what it is meant to do. It should respond instantly.The source of the delay is loading all the modules.
This moves the modules to be lazily imported on the functions where they are used.
Checklist before requesting a review
Testing
Tests pass: