cad-editor/src/scene
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Hakan Seven 0ce918da68 perf(render): skip exploding hatch-free blocks in hatch build
Opening an xref-heavy drawing froze for ~22s before the first frame.
`synced_hatch_models` walked every INSERT and called
`explode_from_document()` to scan the result for hatch fills — but explode
CLONES every child of the block, including 3D solids that each carry tens
of KB of SAB geometry. Clinic.dwg's five xref INSERTs each reference a
discipline block of thousands of solids and no hatch, so this materialized
~25000 solid clones (~1 GB) on every open just to find zero hatches.

Add a memoized `block_contains_hatch`: a read-only scan of the block's
entity types (recursing nested INSERTs, cycle-guarded) that skips the
explode for blocks containing no hatch, transitively. Blocks that do hold
a hatch still explode exactly as before, so the hatch set is unchanged.

Hatch build for Clinic.dwg drops from ~21.7s to ~0.02s, cutting the total
open-to-first-frame time from ~25s to ~5s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 02:03:16 +03:00
..
cache feat(properties): show Thickness in the General group 2026-07-03 16:51:05 +03:00
convert chore(solid): drop needless mut on full_circle 2026-07-04 23:47:00 +03:00
model feat(render): draw ACIS solids as B-rep feature edges, meshes as tri edges 2026-07-04 17:57:00 +03:00
pick feat(pick): select mesh entities by clicking their shaded faces 2026-07-04 23:11:47 +03:00
pipeline fix(render): don't apply the draw-order z-bias to 3D mesh outline edges 2026-07-04 21:04:37 +03:00
text fix(scene): correct MIRROR of TEXT under MIRRTEXT (commit + preview) 2026-07-03 12:42:55 +03:00
view fix(paper): keep model 3D solids off the paper-space sheet 2026-07-03 23:29:18 +03:00
camera_ops.rs fix(camera): keep ortho depth precision constant across zoom 2026-07-02 01:23:27 +03:00
entity.rs perf(render): skip exploding hatch-free blocks in hatch build 2026-07-05 02:03:16 +03:00
group_layer.rs feat(ui): bulk layer on/off, lock, freeze, transparency + Ctrl+A (#236) 2026-07-03 16:06:10 +03:00
layout.rs refactor(viewport): migrate model-space tiling to iced pane_grid 2026-06-27 11:50:11 +03:00
mod.rs fix(pick): don't XY-cull the pick wire set in tilted 3D views 2026-07-04 22:13:37 +03:00
modify.rs fix(scene): correct MIRROR of TEXT under MIRRTEXT (commit + preview) 2026-07-03 12:42:55 +03:00
mspace.rs feat(nav): turntable orbit, selection/cursor pivot, Shift+MMB rotate (#229) 2026-07-01 21:58:04 +03:00
paper.rs refactor: split four oversized files into submodule trees 2026-06-26 22:51:29 +03:00
preview.rs fix(scene): correct MIRROR of TEXT under MIRRTEXT (commit + preview) 2026-07-03 12:42:55 +03:00
project.rs refactor: split four oversized files into submodule trees 2026-06-26 22:51:29 +03:00
selection.rs refactor(properties): entity property groups return Vec<PropSection> 2026-07-02 22:46:19 +03:00