Repository navigation
perf: carry the 0.10.0 performance fixes to main - #1028
Closed
devin-ai-integration[bot] wants to merge 10 commits into
Closed
devin-ai-integration[bot] wants to merge 10 commits into
devin-ai-integration[bot] wants to merge 10 commits into
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 70242d8)
Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit e4fde53)
…the read-only contract Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 24aaa39)
Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit c6bdb49)
Before a name's registration changes, the index notes what a lookup of it reads so that one registered again as it was is not a change. The note held a deep copy of every document's re-export claims and routes on the name, taken once per name a replaced document re-registers. A claims map and the claims in it are now never written once installed: a write installs a new map, so the note shares the index's own tables. What counts as a change is unchanged; tests pin the comparison and the resolver invalidations an edit of a re-exporting document reports. Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 4b4b351)
…ck refuses it The binding check of an assignment or declaration in an action, state or calculation body took the description of where it ran as a string built on every write, whether or not the check failed. checkAssignable, checkNamedWriteAs and checkBodyDeclarationAs now take a func() string and format it only in the refusal they report; the hot callers pass the host's describe method, and the action's own label and a node's description are built the same way. Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 37b4a17)
…s held The cycle walk over held behaviors ran on every quiescent scan, which a constraint check reaches once per check. Remember that no behavior is held under a count of the behaviors that ever entered held, moved by the deferred behavior constructor and by snapshot restore, and answer nil from the memo until that count moves. Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 8bd97fc)
The compiled calc tier held each scalar in 56 bytes and, for every parameter, local and result, boxed it back into the evaluator's constant to decide whether the declaration holds it, building the diagnostic a refusal would name whether or not one followed. A scalar is now the constant packed into 24 bytes (semantics.Packed), unpacked without allocating; which kinds a declaration holds whatever the value is decided once at compile time; the diagnostic is built only on refusal; and the step charge inlines into every node. Results, promotions, refusals, error messages and step counts are unchanged. Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 4a1b937)
IsStateActivity, IsBaseThat and IsOccurrenceThis asked for a target's fully-qualified name on every feature-chain read to compare it against a known name; they now match the owner chain segment by segment with symbols.HasFQN, so a conformant body allocates nothing for the question. Co-Authored-By: jason.han <hanhuijun@gmail.com> (cherry picked from commit 367ca7e)
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
Author
|
Superseded by #1024 ( |
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.
What and why
The release-gate performance measurement of 0.10.0 against 0.9.2 found five regressions whose cost was avoidable rather than the price of a feature, and
developfixed them in six pull requests after the release branch was cut (#1017, #1018, #1019, #1021, #1022, #1023). This hotfix carries those fixes tomainbefore 0.10.0 is tagged, as cherry-picks (-x) in their original order, with their changelog fragments folded into the already-dated 0.10.0### Performancesection as the previous hotfix did. No other change.ParseFile/ParseSources/GetDiagnosticsconvert a cached model's diagnostics to protobuf once instead of on every call (the Annex A vehicle example carries 134 warnings;GRPCParseFileCachedhad gone from 22 to 299 allocations).BatchConstraintsCPU).Fib(25)interpreted had gone 8 → 41 ms).this/that/isActiverecognition compares the owner chain instead of building a qualified name.Specification basis
No behaviour change; every result, diagnostic and step count is unchanged (the pull requests above pin that).
How it was verified
Cherry-picks applied without conflict. Locally on the branch:
go build ./...,go vet ./...,gofmt -l .(empty), andgo test -count=1overinternal/frontend/grpc,internal/semantic/...,internal/exec/runtime/...,internal/workspace/...,internal/check/...,internal/frontend/lsp,internal/frontend/repl,tests/grpc,tests/perf,tests/resolve;python3 scripts/changelog.py check. The measurement of this branch againstv0.9.2is the record in #1015, which is being redone against it.Checklist
make testandmake lintpass locally (the packages the picks touch; CI runs the full race suite)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.md— the fragments are folded into the dated 0.10.0 section, as a hotfix onmainmustmake docs-countsrun if a gate count moved (none moved)F4,K5) in the body, docs, or changelog