forked from 1b-agent/opencadstudio-upstream
The first drawn point costs 946 ms against 17-39 ms for every one after it, and `build=587.67ms` is most of that — a full wire assembly where the following points patch in 1.2 ms. `try_resident_patch` refuses any resident set whose `layout` is `None`, and `install_prepared_open_geometry` inserted the loader's set with exactly that. So the set the file open hands over could never be patched, and the first edit rebuilt all 236 954 wires to add one. The layout is a pure function of the wire order, and the loader already built it for those very wires — `resident_wires_for` stores it in the temporary scene's resident set. It now travels in `PreparedOpenGeometry` like the tessellation memo and the draw-order map, taken by `Arc::ptr_eq` identity so it cannot be paired with a different assembly. `try_resident_patch` also reports why it declines. Each refusal costs a full assembly, and until now the only one that said anything was the shared `Arc`; `no-layout`, `no-entry` and `journal-too-old` were silent. **Not verified.** The headless harness opens through the synchronous path, so `install_prepared_open_geometry` never runs there, and `ZOOM E` does not reach `try_resident_patch` at all — no skip line is emitted for it. This needs a GUI run on the reproducer: the first drawn point should drop well below 946 ms, and if it does not, `resident-patch-skip reason=` now says what is still refusing. Co-Authored-By: Claude Opus 5 <[email protected]>