Repository navigation
perf(pipeline): compile lib_deps and project-as-library in the shared job pool - #1562
Merged
Merged
Conversation
… job pool Every shared-pipeline platform (AVR, ARM families, RP2040, ESP8266, CH32V, ...) compiled lib_deps to completion -- one library at a time -- before the compiler for the core even existed, and compiled the project-as-library archive after the core/sketch join, each on a pool of its own. resolve_lib_deps now only installs libraries and folds in their include dirs, returning a deferred LibDeps; the sequential pipeline compiles it and the project-as-library archive on the same compile_slots gate, joined with core, variant, sketch and local libs. Link order is unchanged (extra inputs, lib_deps archives, project archive). ensure_lib_deps is gone. Test: lib_deps_and_core_share_one_job_gate (two real local libraries plus a core compile on one 2-permit gate: never more than 2 in flight, library compiles overlap the core, archives produced). Part of #1559.
|
Warning Review limit reachedNext included review available in 14 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: FastLED/fbuild/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (18)
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 |
This was referenced Sep 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1559, the second of three PRs. It builds on #1561 and applies to every shared-pipeline platform: AVR, the ARM families (Teensy, RP2040, STM32 incl. Arduino-mbed, nRF52, SAM, Renesas, Apollo3, SiLabs, NXP LPC), ESP8266 and CH32V.
Problem
Each shared-pipeline orchestrator ran
resolve_lib_deps, which installed and compiled everylib_depslibrary (one at a time until #1561) before the core's compiler even existed.run_sequential_build_with_libsthen compiled the project-as-library archive after the core/sketch/local-lib join. Each of those stages used a pool of its own.Fix
resolve_lib_depsnow only installs libraries and folds their include dirs into the list. It returns a deferredLibDeps, and no longer takes ajobsargument.ensure_lib_depsis removed.run_sequential_build_with_libs(..., extra_link_inputs, lib_deps: LibDeps, ...)compileslib_depsand the project-as-library archive on its singlecompile_slotsgate. They run in the sametokio::join!as core, variant, sketch and local libs, and it staysjoin!, nevertry_join!, so every branch is awaited.compile_project_as_librarytakes the gate.lib_depsarchives, then the project archive. RP2040 and NXP LPC used to append the library archives to their own support inputs; those now pass their inputs asextra_link_inputs, and the pipeline appends the library archives after them, which gives the same order.compile-lib-depsandproject-as-lib. Both overlap the core compile in wall time.compile_project_as_libraryhere; PR3 moves ESP32 onto the one shared gate.Tests
lib_deps_and_core_share_one_job_gatebuilds two realsymlink://libraries throughresolve_lib_depswith fake toolchain scripts, and runs a core compile on the samejob_gate(2). It asserts:It passed 50 of 50 runs.
fbuild-build-engine473,-mcu77,-arm228,-esp137 tests pass. Workspace clippy is clean.Light end-to-end
uno+FastLED=symlink://firmware.hex14.22 KB (identical to before)bench/blink -e unoCold before/after timings come at the end of #1559.