Repository navigation
perf(compile): reuse unaffected model renders after model-only edits - #955
Merged
Merged
Conversation
…ers off the critical path Reuse per-model attached audits and whole audit groups after model-only edits, store renders as a base file plus a bounded overlay, pickle new renders on a background thread, keep GC paused across compile and store, and resolve lint project files once per parent directory.
…nd release them once decoded Serialize renders at store time instead of on a background thread, which contended for the GIL with analysis. Skip render storage on cold compiles, compress render files with zlib, release stored render bytes after rendering, and announce slow render loading and recording. Carry forward stored module stamps whenever a render is reused, so outside modules imported only while rendering stay tracked.
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
Editing one model recompiled every model from scratch. Compile reuse (#951) only helps when nothing changed. This change reuses unaffected renders after model-only edits, with output byte-identical to
--no-cache.Changes
Invalidation by input kind (change set C comes from stored file stamps and digests; invocation, runtime, env, settings and modules must be unchanged):
run.idor provider settings are never stored.Storage: renders are stored only when a compile entry already exists, so cold compiles pay nothing. Files are a zlib-compressed base plus a bounded overlay, two newest kept, verified on read; any fault means a full render. Stored bytes are released once renders are decoded.
Verification
--no-cache; fails when change detection is broken. Save-policy test: cold stores no renders, the next miss does.make test,make check-ci.