Skip to content

perf(core): skip lib prefix during empty-retention compaction (#13047)#13383

Closed
mohsen1 wants to merge 1 commit into
mainfrom
codex/lib-compaction-13047-s4-20260613
Closed

perf(core): skip lib prefix during empty-retention compaction (#13047)#13383
mohsen1 wants to merge 1 commit into
mainfrom
codex/lib-compaction-13047-s4-20260613

Conversation

@mohsen1

@mohsen1 mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Goal: fast

Summary

  • Add a pure shared-prefix fast path in premerged-lib symbol densification.
  • When all lib symbols live in the shared prefix and no lib symbols need retention, compact only private appended symbols instead of walking the whole lib universe to filter it away.
  • Preserve the existing retained-lib/global-augmentation fallback path unchanged.

Structural rule

When a user-file binder cloned from the premerged lib universe has a pure shared lib prefix and no retained lib symbols, compaction should remap only private user symbols. tsz now keeps the same binder/core owner layer and avoids one O(lib universe) scan/allocation pass in that empty-retention case; mixed prefixes or retained-lib references still use the existing full densification path.

Verification

  • Not run locally per instruction.
  • Pre-commit formatting hook ran during commit.
  • Draft CI pending.

Provenance

Machine: MacBookPro.fritz.box
Assistant: codex
Model: GPT-5
Effort: high

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Provenance: MacBookPro.fritz.box / codex / GPT-5 / high

Draft/WIP reason: this is the next claimed #13047 Fast-goal slice, and CI has not run on the pushed head yet.

Current work: premerged-lib symbol densification now has a pure shared-prefix/empty-retention fast path that compacts only private appended symbols, leaving retained-lib and mixed-prefix behavior on the existing full path.

Blocker/current state: no known code blocker; waiting for draft CI on head c7dd2eafb6.

Next action: if draft CI passes, update verification in the PR body and mark ready; if CI fails, fix in this PR.

Verification: not run locally per instruction; pre-commit formatting hook ran during commit.

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Provenance: MacBookPro.fritz.box / codex / GPT-5 / high

Closing this draft as fully superseded by PR #13382.

Evidence: #13382 targets the same #13047 premerged-lib densify path, but carries the broader/safter workset rule: pure shared-prefix compaction copies retained lib symbols plus private appended symbols, preserves the mixed-prefix fallback, splits the helper out to keep parse_and_libs.rs under the line ceiling, and already records focused local verification plus passing draft/light CI at 31207895d06ef06c489d0476b777638d6ca3b32e.

This draft (#13383) only covered the empty-retention subset and has no unique findings beyond that narrower case. Keeping both open would create duplicate overlap in the same owner path.

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #13382; see the provenance/evidence comment above.

@mohsen1 mohsen1 closed this Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant