Repository navigation
perf(compile): reuse the previous compile when no input changed - #951
Merged
Merged
Conversation
Replay the stored report, diagnostics, and exit code when the project files, invocation, tracked environment, runtime, and written artifacts all match the previous compile. Misses, bypasses, and damaged entries fall back to a full compile.
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.
Why
A warm
sqb compilewith nothing changed still rediscovered, re-rendered and re-checked every model: about 8 s on a dense 3k project and 27 s at 10k. Checking that no input changed takes milliseconds (CHI-498, stage 1 of CHI-482).Changes
sqb compilereplays the previous stdout (identical apart fromcompile_timings) and exit code, including failed compiles, and prints one stderr line.--vars, target, cwd,SQLBUILD_*/SQB_*and template-read env vars, provider settings env vars, env files and secrets, Python, SQLBuild and native build identity, and loaded modules.target/compiledmust match what this compile wrote.--no-cache,--manifest,--debug, profiling,compile_cache = false,run.id, andSQLBUILD_DISABLE_COMPILE_REUSE=1. Docs list inputs and limits.Verification
--no-cache, miss exactly when it should), provider-settings, concurrent-writer, corruption and store-failure tests; compile and build E2E run once with reuse enabled.make test,make check-ci.