perf: remove large drawing stalls
Keep resident geometry and GPU resources stable across edits, MSPACE zoom, and Model/Paper switches. Add unified PERF output for tracing remaining costs.
This commit is contained in:
parent
2bc4c1c8f3
commit
12bf126646
26 changed files with 794 additions and 325 deletions
|
|
@ -819,8 +819,8 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
|||
let clone_started = std::time::Instant::now();
|
||||
let mut snapshot = self.tabs[i].scene.document.clone();
|
||||
let clone_ms = clone_started.elapsed().as_secs_f64() * 1000.0;
|
||||
if std::env::var_os("OCS_PERF").is_some() {
|
||||
eprintln!(
|
||||
if crate::perf::enabled() {
|
||||
crate::perf_record!(
|
||||
"[perf] save-snapshot {:.1}ms entities={} objects={} purpose={purpose:?}",
|
||||
clone_ms,
|
||||
snapshot.entities().count(),
|
||||
|
|
@ -848,8 +848,8 @@ pub(super) fn on_open_file(&mut self) -> Task<Message> {
|
|||
png,
|
||||
viewport,
|
||||
);
|
||||
if std::env::var_os("OCS_PERF").is_some() {
|
||||
eprintln!(
|
||||
if crate::perf::enabled() {
|
||||
crate::perf_record!(
|
||||
"[perf] save-thumbnail {:.1}ms wires={}",
|
||||
started.elapsed().as_secs_f64() * 1000.0,
|
||||
wires.len(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue