forked from 1b-agent/opencadstudio-upstream
layouts: keep every content viewport's wires cached (#1769)
The resident wire sets were capped at 16 and cleared once more were held. A layout with more content viewports than that (24 in the report) cleared them all on each redraw and re-tessellated the model for every viewport, so the layout stayed sluggish even when nothing changed. The cap now covers the shown layout's viewports: idle redraws build no wires, and a frame of that layout draws in ~14 ms instead of ~30 ms plus ~100 ms of rebuilds. The automation bridge gains a `layout_switch` action, as clicking a layout tab does, which is how this was measured. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
cf763dcd49
commit
7f411bc02d
2 files changed
+11
-1
No files matched your search
@@ -1166,6 +1166,8 @@ impl OpenCADStudio {
|
||||
let name = string(req, "name")?;
|
||||
let msg = match name {
|
||||
"close_modal" => Message::CloseModal,
|
||||
// Show a layout (or "Model"), as clicking its tab does.
|
||||
"layout_switch" => Message::LayoutSwitch(string(req, "value")?.into()),
|
||||
// The "changed outside" modal's suggested actions (D6): reload
|
||||
// the disk copy, keep the in-memory one and overwrite, save as,
|
||||
// or dismiss. Native only — the web build has no such dialog.
|
||||
|
||||
Reference in new issue
Block a user