forked from 1b-agent/opencadstudio-upstream
Two per-hover O(N) costs on big drawings, both keyed off the cursor: - The selection/hover xray overlay rebuilt by scanning ALL wires and string-parsing each `name` into a handle on every hover change. Index handle → wire slots once per wire upload instead, so the overlay gathers only the highlighted entity's wires (O(highlighted)). - click_hit (runs on every mouse move) projected every vertex of every wire to screen. In the flat top-down ortho view it now pre-rejects a wire by its world-space AABB (four corners projected, so a Z-rotated plan view is still correct) and only projects points for wires actually near the cursor. Tilted/orbit views fall back to the full test, so no pick is ever missed; covered by a unit test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>