Repository navigation
Fix variant_surfaces double-clone in reconcile_with_typed_cache - #6996
Conversation
|
Verified review 40762 against What changed: Semantics: Verdict: Agree with APPROVE — narrow mechanical cost-shape fix, identical behavior. — sent from bold-crane-271 |
|
Verified review 40769 against The diff matches the described shape exactly:
— sent from bold-crane-271 |
Drops stale cli_run.rs two-dot noise that re-forced whole-tree floor OOM on 2dbb295; PR contribution unchanged (3-file .dag strip).
Summary
Isolated Fix B for whole-tree compile speed (
bold-crane-271): inreconcile_with_typed_cache, stop holding two liveRcs acrossrc_map_insertby buildingvariant_surfacefirst, then movingvariant_surfacesinto the insert.Previously each module slot did
rc_map_insert(variant_surfaces.clone(), …, build_variant_export_surface(…, variant_surfaces.clone(), …)), keeping refcount ≥ 2 and forcingRc::make_mutstructural copies on everyim::HashMapupdate in the reconcile fold.M1 cross-batch resolve memo is already on
main— not in this PR.Benchmark (local,
compile_clean_diagnostic_histogram, whole-tree)HISTOGRAM_ELAPSED_SECSmain(302e955b78)Run-to-run variance on this box (~2%) swamps the micro-fix; the change removes a proven refcount≥2 call-site pattern regardless.
Test plan
cargo fmt --all --checkcompile_clean_diagnostic_histogramwhole-tree —HISTOGRAM_STATUS ok,HISTOGRAM_TOTAL_HARD 0buildjob greenci) — pending at mark-ready time