Skip to content

Reduce private source model allocation cost - #138

Merged
iperev merged 1 commit into
mainfrom
perf/source-model-materialization
Sep 20, 2026
Merged

iperev merged 1 commit into
mainfrom
perf/source-model-materialization

Conversation

@iperev

@iperev iperev commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Transfer locally owned atomic/layout projections into the private source model instead of copying them twice.
  • Preallocate requirement/origin slices from the already-admitted member total; retain reference-edge compaction, the input snapshot, both preflights and all detached accessors.
  • Add independent caller/accessor mutation, later-normalization and retained-capacity regression checks, plus allocation benchmarks.
  • Prepare compatible release 0.14.20. Public source formats, CLI semantics, resource limits, dependencies and platform support are unchanged.

Proof Boundaries

The paired source-bound experiment compares 111 successful projections, 17 rejected inputs with exact expected diagnostics, and empty/singleton/unequal-group cases. Six samples at each of 64, 512 and 4096 members show approximately 24-29% lower median B/op for this finite family. This is not a universal speedup, peak-RSS claim or proof of a larger safe input domain.

Three isolated mutations are rejected by the permanent tests: wrong member cardinality, removal of reference compaction and an aliased atomic accessor. Full product and provider checks are attached to the exact PR head; review evidence does not replace them.

This closes only the resource-ownership optimization prerequisite. It does not activate source-v2, complete Batch B, replace the deferred human authoring study or close the global roadmap. Future versioned resource-domain restrictions require explicit migration refusal before writes, never silent truncation.

Retrospective

An early copy-only candidate retained excess backing capacity and was rejected before delivery. The first review package also lacked transitive producer and complete benchmark-input evidence; a new frozen package added the actual owners, full source/binary bindings and explicit rejection cases. Original failed and unresolved evidence is preserved. No active skill or provider policy was modified.

@iperev
iperev merged commit fe7b71f into main Sep 20, 2026
9 checks passed
@iperev
iperev deleted the perf/source-model-materialization branch September 20, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant