Repository navigation
perf(compile): stop the speculative SQL lint when its result is unused - #919
Merged
Merged
Conversation
… per file Signal the speculative lint thread to stop as soon as the compile knows its result will not be consumed (graph errors or end of analysis), checking the stop between files and bodies instead of joining a full lint run. Report any remaining join as compile_timings.early_lint_wait_ms. Build each file's newline table once per native lint pass instead of once per violation.
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
Compiles start a speculative SQL lint in a background thread. When the compile has graph errors, the rules step never runs, but the compile still blocked for the lint to finish, about 10 s on a ~1,400-model project, outside every timing phase. The thread also competed for the GIL with model analysis. The lint itself rebuilt each file's newline table once per violation, character by character (CHI-479).
Changes
compile_timings.early_lint_wait_msrecords any remaining wait.Verification
make test,make check-ci.