forked from 1b-agent/opencadstudio-upstream
The purge scan tests every entity with is_entity_corrupt, whose per-vertex finite/extent checks on large polylines dominate. Detection is pure and read-only, so gather entity refs in one pass and test across cores with rayon; removal stays serial (remove_entity needs &mut doc). Cuts the "purge" span in the open-time breakdown on polyline-heavy files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>