Skip to content

perf(core): skip dropped lib prefix during densify (#13047)#13382

Merged
mohsen1 merged 5 commits into
mainfrom
codex/lib-cow-followup-13047-s4-20260613
Jun 13, 2026
Merged

perf(core): skip dropped lib prefix during densify (#13047)#13382
mohsen1 merged 5 commits into
mainfrom
codex/lib-cow-followup-13047-s4-20260613

Conversation

@mohsen1

@mohsen1 mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Goal: fast

Summary

  • Add a focused premerged-lib compaction helper for the densify workset.
  • In the pure shared-lib-prefix case, copy only retained lib symbols plus private appended user symbols instead of scanning every dropped lib-prefix symbol twice.
  • Keep mixed-prefix arenas on the old full-filter path and split the helper/tests into a small owner file so parse_and_libs.rs stays below the 2000-line gate.

Structural rule

When a cloned premerged-lib binder keeps the entire lib universe in SymbolArena shared prefix, per-file compaction only needs retained lib symbols plus private appended file symbols. tsz preserves binder/core semantics by using the optimized workset only when shared_prefix_len == lib_symbol_ids.len(); any mixed-prefix or unusual arena shape falls back to the previous full symbol filter.

Verification

  • Synced with current origin/main; latest pushed head preserves the same diff plus CI-refresh-only commits as needed for merge queue eligibility.
  • scripts/safe-run.sh cargo nextest run -p tsz-core premerged_lib_compaction_tests (2/2 passed)
  • python3 scripts/arch/arch_guard.py
  • cargo fmt --check
  • git diff --check origin/main..HEAD
  • Line ceiling checked: parse_and_libs.rs 1994 lines, premerged_lib_compaction.rs 81 lines.
  • Fresh ready-review CI is required before queueing.

Provenance

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

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Corrected draft-state note for this PR (the previous comment had markdown backticks interpreted by my shell before posting).

Reason/current work: this is the next #13047 / #13250 Fast-goal slice. It narrows premerged-lib compaction densify to retained lib symbols plus private appended file symbols when the binder has the ordinary pure shared-lib prefix. Mixed-prefix arenas keep the old full-filter behavior.

Blocker/current status: local focused verification is green, but CI still needs to prove the exact remote head before this can move to ready review.

Next action: wait for draft/light CI; if green, update verification and mark ready. If red, fix this branch before promotion.

Verification: scripts/safe-run.sh cargo nextest run -p tsz-core premerged_lib_compaction_tests; python3 scripts/arch/arch_guard.py; cargo fmt --check; git diff --check origin/main...HEAD; line ceiling checked (parse_and_libs.rs 1994 lines, premerged_lib_compaction.rs 81 lines).

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

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Moving this out of draft: exact-head draft/light CI passed for 31207895d06ef06c489d0476b777638d6ca3b32e, and the PR body now records the passed gates.

Current work/blocker: ready-review CI must produce an exact-head CI Summary before this can enter the native merge queue.

Next action: watch ready-review CI; if green, queue with --match-head-commit, and if red, triage the failing job in this PR.

Verification: local targeted checks plus draft/light CI are recorded in the PR body.

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

@mohsen1

mohsen1 commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator Author

Main-sync refresh for #13382:

  • Merged current origin/main into codex/lib-cow-followup-13047-s4-20260613 and pushed refreshed head 9849dfc0b501faa98e0e2f79e0997a7ebf1e67a1.
  • Merge was clean; it only brought in the already-merged perf(solver): delay instantiation member list allocation (#13242) #13374 solver instantiation changes.
  • Verification on the refreshed head passed:
    • scripts/safe-run.sh cargo nextest run -p tsz-core premerged_lib_compaction_tests (2/2)
    • python3 scripts/arch/arch_guard.py
    • cargo fmt --check
    • git diff --check origin/main..HEAD
    • line ceiling check: parse_and_libs.rs 1994 lines, premerged_lib_compaction.rs 81 lines
  • PR body has been updated and verified remotely. Fresh ready-review CI is now the blocker before queueing.

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

@mohsen1 mohsen1 added this pull request to the merge queue Jun 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 13, 2026
@mohsen1 mohsen1 added this pull request to the merge queue Jun 13, 2026
Merged via the queue into main with commit c16a750 Jun 13, 2026
37 checks passed
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