chore(scene): drop INSERT_SUB_LIMIT guard from fallback explode path

The 5,000 sub-entity guard was added when an xref block with ~74k subs
froze the UI on first render. The block_cache primary path (def72e4)
made that path unreachable for typical Inserts — the guard now only
gated the rare legacy-explode fallback, where it hid otherwise-renderable
geometry as an insertion marker.

Remove the constant and its early-return; the fallback path now matches
the primary path's "render everything" behaviour. Also drop the
RENDERING_OPTIMIZATION.md "TEMPORARY" section that tracked this guard.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-05-15 23:53:26 +03:00
1 parent a997490814
commit 15bddb2f58
2 files changed
+3 -48

No files matched your search

+3 -8
View File
@@ -4344,18 +4344,13 @@ fn tessellate_entity(
}
}
// Cache miss / unavailable: fall back to the original explode path,
// but keep the safety bail-out for pathologically large blocks so
// the UI doesn't hang on broken or unbounded sub-entity counts.
const INSERT_SUB_LIMIT: usize = 5_000;
// Cache miss / unavailable: fall back to the original explode path.
// The block_cache primary path covers all typical Inserts; this
// branch only fires for pathological cache failures.
let br = document.block_records.get(&ins.block_name);
let sub_count = br.map(|br| br.entity_handles.len()).unwrap_or(0);
let is_xref = br
.map(|br| br.flags.is_xref || br.flags.is_xref_overlay)
.unwrap_or(false);
if sub_count > INSERT_SUB_LIMIT {
return vec![marker];
}
let mut wires: Vec<WireModel> = ins
.explode_from_document(document)
.iter()