Perf/lazy libcst load - #146
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 24 minutes and 27 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
7631bae to
8b6e54d
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity for 14 days. If you believe this PR is still relevant, please:
This helps us keep the repository focused on active contributions. Thank you! 🙏 |
|
This pull request has been automatically closed because it was marked as stale and had no recent activity for 3 days. If you believe this PR should be reopened, please:
Thank you for your understanding! 🙏 |
solve #142
The recent commit enhances the performance characteristics of the SyntaxVerifier module by mitigating unnecessary initialization overhead along the verification hot-path. We restructured the heavy dependency on libcst by moving it out of the iterative evaluation loop and into a module-level global cache retriever, guaranteeing that libcst is only lazily loaded into execution memory upon the very first instance it is definitively required. Furthermore, the _find_dangerous_calls and _count_imports analytical routines were retrofitted to adopt the globally shared AST structures passed through the system's VerificationContext object. By directly inheriting this pre-compiled syntax tree, we avert redundant and expensive parsing cycles on identical files, effectively minimizing memory footprints and significantly decreasing validation times across large, complex codebases.