Compile client/server/mcp in parallel with caching - #385
Draft
npapagna wants to merge 2 commits into
Draft
Conversation
npapagna
force-pushed
the
npapagna/faster-compile
branch
2 times, most recently
from
August 6, 2026 20:53
eb9d51f to
5e3a251
Compare
npm run compile ran a full, uncached type-check across all four projects every time, even when only one file changed. Each tsconfig now enables incremental compilation with a dedicated .tsbuildinfo file under node_modules/.cache/tsc/, so tsc skips unchanged files on repeat runs the same way lint and format already do. A no-op or single-file recompile drops from about 9.4s to under 4s; compile:clean forces a full re-check when the cache is suspected stale. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
npapagna
force-pushed
the
npapagna/faster-compile
branch
from
August 7, 2026 11:22
5e3a251 to
8320e75
Compare
npm run compile chained client, bin, server, and mcp through &&, so they always ran one after another even though none of them depend on each other's output. Each one still pays its own fixed startup cost (loading the compiler, parsing tsconfig, checking its .tsbuildinfo cache) on top of whatever it actually needs to recheck, so a no-op compile paid that cost four times in a row for no reason. concurrently now runs all four at once, so the wall-clock time is close to whatever the slowest one takes rather than the sum of all four. Each tsc invocation still uses its own .tsbuildinfo cache (from the previous commit) to skip files that haven't changed; this just removes the artificial serialization on top of that. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
npapagna
force-pushed
the
npapagna/faster-compile
branch
from
August 7, 2026 13:32
8320e75 to
65ee5b8
Compare
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.
Summary
.tsbuildinfoundernode_modules/.cache/tsc/).&&.mcp-server's cross-package dependency on twoclient/srcfiles is scoped so it no longer invalidatesclient's andserver's caches too.compile:bin(CI-only helper-script type-check) stays out of Lage's task graph, running as a plain sequential step after.Test plan
npm run lint && npm run format:check && npm run compile && npm testall pass locallynpm run compiledrops to well under a second (Lage skip-cache)--continuestill surfaces every project's compile errors, not just the first