Repository navigation
perf(install): warm pip install . ~23s -> ~2s (in-tree backend, per-repo target dir) - #1683
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 43 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
… -> ~10s) Warm `pip install .` already skips cargo (staged artifacts up to date), but setuptools deflated ~240 MB of dev-profile binaries at zlib's default level: ~12.5 s to zip plus ~3 s to unzip. The wheel is a throwaway local artifact, so bdist_wheel now uses compression=stored. Release wheels are assembled by ci/publish.py and are unaffected.
799979b to
06e2359
Compare
The shared bosn daemon rejects clients from another release, so the exact pin made the gate fail whenever a newer daemon (0.1.22) was running. Use a floor and refresh so the gate always runs the latest bosn.
Replace the setuptools backend with ci/build_backend.py (git mv of setup.py). It has no build requirements (pip's isolated env is empty, no setuptools install), skips the three setup.py subprocesses and the build/ + bdist/ copies of ~240 MB of binaries, and writes the wheel in one stored pass. Editable installs write a plain .pth onto python/, as before. CARGO_TARGET_DIR is now persistent per repo root: ~/.fbuild/cargo-target/wheel-build/<repo>-<sha256(root)[:12]>, so each checkout keeps a stable warm cache and checkouts never thrash each other. Measured on Linux, warm (cargo skipped): pip install . 1.6-2.8 s, uv sync 1.6 s.
The pyproject cleanup in #1683 deleted the [build-system] table along with the setuptools sections, so pip fell back to setuptools' default backend and `pip install .` failed with 'Multiple top-level packages discovered'. Verified: cold pip install . (full cargo build) succeeds; warm reinstalls 3.0-5.7 s on a loaded machine; fbuild runs and fbuild._native imports.
Summary by CodeRabbit