Commit graph

2 commits

Author SHA1 Message Date
google-labs-jules[bot]
2b35b53777 Bolt: optimize review_pull_requests.py with bulk Git metadata fetch
This commit implements a significant performance optimization for the
`review_pull_requests.py` script by replacing O(N) subprocess calls with a
single bulk metadata fetch using `git for-each-ref`.

Key changes:
- Added `get_git_version()` helper to check for `ahead-behind` support (Git 2.41+).
- Implemented `fetch_bulk_branch_metadata()` to retrieve ahead/behind counts,
  last commit dates, and latest subjects for all remote branches in one call.
- Introduced `BRANCH_METADATA_CACHE` to store metadata and avoid redundant
  subprocess calls in `get_prs_via_git()` and `get_branch_info()`.
- Maintained output parity and provided a safe fallback for older Git versions.

Performance impact:
- Overall execution time reduced from ~0.89s to ~0.57s (~37% improvement).
- Script logic time (excluding Python startup) reduced from ~0.39s to ~0.07s
  (>80% improvement for 300+ branches).
2026-02-26 18:13:23 +00:00
Huawei-Window-Techno
365881c76a feat: Add pull request review script and comprehensive report - Created review_pull_requests.py to analyze all PRs - Generated Pull Request Review Report with 23 open PRs analysis - Identified 20 performance optimization PRs ready for review - Documented 5 draft PRs and 2 WIP feature PRs - Added recommendations for PR consolidation and prioritization 2026-01-10 05:26:35 +07:00