forked from 1b-agent/opencadstudio-upstream
perf(io,scene): drop redundant purge walk, fuse world-offset scan
Phase 1.1: resolve_xrefs now purges corrupt entities inline as it merges each xref and returns the dropped count, removing the second full-document purge_corrupt_entities walk in the FileOpened handler. Every xref-bearing open saves one O(N) entities() pass. Phase 2.4: split compute_world_offset into offset_prep / offset_centroid / world_offset_from_centers; centroid accumulation now rides the existing cache-handle walk in build_derived_caches. Two O(N) entity walks collapse into one, with identical MSPACE-membership filtering preserved. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
b466747074
commit
3098523b8d
7 files changed
+149
-120
No files matched your search
+1
-1
@@ -256,7 +256,7 @@ fn finite_vec3(v: &acadrust::types::Vector3) -> bool {
|
||||
}
|
||||
|
||||
/// Returns true if the entity looks like parser garbage and should be dropped.
|
||||
fn is_entity_corrupt(e: &EntityType) -> bool {
|
||||
pub(crate) fn is_entity_corrupt(e: &EntityType) -> bool {
|
||||
use acadrust::entities::EntityType as E;
|
||||
// Reject polylines at or above this vertex count. Even valid drawings
|
||||
// rarely use this many — and parser desync produces exactly-100_000-vertex
|
||||
|
||||
Reference in new issue
Block a user