-
Couldn't load subscription status.
- Fork 22
optimize codeflash import time #245
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
Conversation
defer optimizer defer git imports libcst.matchers is heavy defer jedi discover_unit_tests.py
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
User description
defer optimizer
defer git imports
libcst.matchers is heavy
defer jedi
discover_unit_tests.py
PR Type
Enhancement
Description
Lazy-load heavy dependencies inside functions
Remove top-level
git,jedi, andlibcst.matchersimportsDefer benchmarking modules imports until necessary
Improve CLI startup time by deferring imports
Changes walkthrough 📝
cli.py
Lazy-load Git and GitHub importscodeflash/cli_cmds/cli.py
gitand GitHub utils importsgit_utilsandgithub_utilsimports inside functionsgitimport in parsing logiccode_extractor.py
Defer `libcst.matchers` importcodeflash/code_utils/code_extractor.py
libcst.matchersimportlibcst.matchersin transformercode_context_extractor.py
Lazy-load `jedi` inside context extractorcodeflash/context/code_context_extractor.py
jediimportsTYPE_CHECKINGguard forNametypejediimports inside functionsdiscover_unit_tests.py
Defer `jedi` import in test discoverycodeflash/discovery/discover_unit_tests.py
jediimportjediimport in test processingoptimizer.py
Lazy-load optimizer dependenciescodeflash/optimization/optimizer.py
runmethod