Commit graph

2 commits

Author SHA1 Message Date
Claude
0589729e34
Merge remote-tracking branch 'origin/litellm_internal_staging' into claude/pre-commit-performance-m1fspt
Staging moved the heavy entrypoints behind scripts/gate_slot_lock.py, so
`lint` and `check` now only queue for a machine-wide slot and delegate to
`lint-inner` / `check-inner`. Keep that indirection and hang this branch's
changes off the inner targets: the parallel setup sub-make moves to
lint-inner, and check-inner depends on bootstrap-python rather than the
full bootstrap.

test_lint_overlaps_env_sync_with_base_fetch drives the real `lint` target,
so its sandbox now carries gate_slot_lock.py and runs with
LITELLM_GATE_SLOTS=0.
2026-08-17 16:45:41 +00:00
Claude
0ce1359e78
perf(lint): schedule the lint fan-out around its long pole
lint-checks declared its cheapest checks first, so at narrow widths
basedpyright queued behind them and pushed the makespan out by their
runtime. Declare the prerequisites longest-first instead, measured on
this tree: basedpyright 124.4s, type-discipline 34.4s, e2e 7.0s,
import-safety 3.7s, gate 3.4s, the rest under a tenth of a second.

Cap the fan-out at LINT_JOBS ?= 2 rather than one job per core. Every
check other than basedpyright totals 48.6s against its 124.4s, so a
single spare slot absorbs all of them and further slots only take cores
from the critical path. ?= keeps it overridable and dropping the
sysctl/nproc shell-out saves a subprocess per Makefile parse.

Run lint-install and lint-fetch-base under their own -j 2 sub-make. One
waits on the disk and the other on the network, so paying their sum
bought nothing.

Nine paired trials, arms alternating: 131.04s before, 127.12s after,
3.0% faster, 8/9 trials favouring after. The floor is basedpyright's
124.4s, so the run is now 2.2% above it.
2026-08-12 00:30:38 +00:00