Repository navigation
Conversation
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
Performance change vs mainWorkflow run · main Clef gate: Running benchmarks because the decision was unavailable (ValueError). Release builds, default checker count;
Negative means the PR used less; positive means it used more. Deltas are medians of paired PR/main ratios for wall time and instructions. Shared CI machines and parallel scheduling add noise to small changes. |
Stage one of #646. new_program, update_program and reuse_program return a ProgramBox whose Drop does what free_program did; the processed-file data a full build's versions share is an Arc in Program, freed with the last version. The five free sites (watch, build task, orchestrator, LSP program owner, transpileModule) drop the owner instead; the CLI and the test harness leak it as before. The &'static Program view is unchanged.
a7767b3 to
5f50a29
Compare
|
This is still calling |
stage one of the lifetime work. design PR, i want a call on the handle shape before touching the ~187 call sites
why
new_programhanded back a leaked&'static Programand five places freed it by hand with an unsafe call. the data shared between a build's versions had a third free that every caller had to order after the last program themselveswhat changed
new_program/update_program/reuse_programreturn aProgramBox. deref is the same&'static Programas before,leak()is for the cli and the test harness (they never freed anyway), drop does whatfree_programdidArconProgram, the last version to drop frees it.free_unshared_programandSharedProgramDataare goneprogramOwner,transpileModule) just drop the ownertradeoff
the view is still
&'static, so safe code can still copy it out and read it after the owner drops. same hole as before, one owner instead of five free calls. one order moved: the lsp frees the shared data with the last program now, before the regions, not when the base region goes. poison runs are cleanthe question
stage two makes the view a borrow. that touches ~187 sites in tsrs_ls, tsrs_incremental and the checker pool, and the
&'static selfmethods onProgramand the pool's back reference are where a lifetime has to appear. lifetime-carrying view, or an arc-like owner that the pool and the incremental program clone?numbers
perf gate run twice over the 19 projects. instructions flat (0.0% on the big ones, ±1% on the sub-second ones where the counter moves that much on its own). peak rss within 1%, one +2.6% on date-fns that was -0.4% on the rerun. wall time ±5% both directions with no repeat outlier, same spread a no-op PR gets on these runners. one arc clone and one dec per program, the hot path is unchanged
rebases over #638 and #645 with a small conflict on the
#[expect]reasons