Repository navigation
|
With mbx 1.23.0 at its defaults, a comment-only edit in a Tauri 2 workspace (Wealthfolio) rebuilds in 65–69 s, against 35–40 s with plain Cargo. A build with no source changes takes 35 s instead of 14 s. Nearly all of the difference is one crate. The app's library has I understand from the caching-limits docs that this crate type isn't cacheable. Is it also intended that the bypass gets no private incremental state, unlike the other workspace crates? Tauri's project template uses the same crate-type list, so other Tauri apps may see this too, but I've only measured Wealthfolio's Linux dev builds. Happy to run anything else that would help. Repro, numbers and mbx outputSetup
ReproThe repo is wealthfolio/wealthfolio at git clone https://github.com/wealthfolio/wealthfolio && cd wealthfolio
git checkout ace5c5243d890f22cf68118ed74986cac8f4cb17
mkdir -p dist && echo '<!DOCTYPE html><html><head></head><body></body></html>' > dist/index.html # Tauri's frontendDist
touch .env # both the app and server build scripts watch the root .env
mbx build --workspace --locked # cold
mbx build --workspace --locked # no source changes
echo '// edit' >> crates/core/src/lib.rs && mbx build --workspace --locked
git checkout -- crates/core/src/lib.rs && mbx build --workspace --lockedEach edit or revert recompiles the same 10 workspace crates in both modes. The build with no source changes recompiles only NumbersWall time / user CPU time of the build, in seconds:
The mbx rows ran in one checkout, in table order. Turning off the pressure check or the scheduler lowered wall time somewhat, but it didn't close the gap to plain Cargo. These were sequential single samples, so they don't isolate the scheduler's effect. The mbx's summaryA later edit with defaults: The same kind of edit with
The other workspace crates took about the same time in all three. The build with no source changes showed The first edit after the cold build fits the 11 other compilations seeding their incremental state ( AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5-5; version: 2.1.291. AI-assisted — Tool: Codex CLI; model: copilot_api/gpt-6-astra; version: 0.162.1. |
Replies: 3 comments 1 reply
|
Adding the diagnostics the troubleshooting guide's "Report a problem" section asks for, plus All four come from one edit build with default settings. It ran in the same checkout, environment and cache directories as the runs above, after one warm-up edit and revert. The build took 1m 17s, and The bypass log has one record, and it names
|
|
Thanks for the thorough report. Your reading of the source is right: a #695 fixes it. A workspace library whose crate types include I have not re-measured Wealthfolio. If you can run your loop against that branch, the One caveat: a cacheable crate that depends on such a library will not hit the cache after the library changes. AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable. |
|
Implemented in #695: fix(incremental): compile staticlib and cdylib workspace libraries incrementally |
Thanks for the thorough report. Your reading of the source is right: a
staticlibbypasses the cache before any learned incremental plan exists, and mbx setsCARGO_INCREMENTAL=0, so the crate got no private incremental state and recompiled from scratch on every edit. That wasn't intended.#695 fixes it. A workspace library whose crate types include
staticlibordylibnow gets learned incremental state from its first build and reuses it afterwards. It is still reported as anunsupported-crate-typebypass, because nothing about caching it changed.learned_incremental = falseturns it off. Bypassed binaries and tests are unchanged.I have not re-measured Wealthfolio. If you can run your loop …