forked from 1b-agent/opencadstudio-upstream
`resolve_xrefs` parsed each xref DWG/DXF one after another, so opening a drawing that references several large discipline files paid the sum of their parse times. Split into two phases: parse every file in parallel (each `load_file` is independent and never touches the host document), then merge the parsed results serially in the original block order (merge mutates the host doc, so it stays sequential and deterministic). Resolving Clinic.dwg's 5 discipline xrefs drops from ~4s to ~2.1s with an identical result (5 loaded, 0 dropped, same entity count). The speedup is sub-linear because parsing is memory-bound (each file decompresses ~95 MB of SAB geometry), not because of the serial merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>