forked from 1b-agent/opencadstudio-upstream
perf: say which message caused an edit's latency
The first measurement showed four consecutive edits at ~192 ms each with a handler cost of 0.55 ms. That is below the `update` line's 5 ms threshold, so the log reports the latency but not what asked for it — and whether a live command preview is bumping the geometry epoch on every mouse move is exactly the question the numbers raise. `nav-prepare` now carries the message label alongside the op. Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
1 parent
b4ae4cad4e
commit
d267083a29
3 files changed
+21
-3
No files matched your search
@@ -334,8 +334,11 @@ impl OpenCADStudio {
|
||||
if let (Some(started), Some(before)) = (perf_started, perf_epoch_before) {
|
||||
let tab = &self.tabs[self.active_tab];
|
||||
if tab.scene.geometry_epoch != before {
|
||||
tab.scene
|
||||
.record_nav_perf(crate::scene::NavPerfOp::Edit, started);
|
||||
tab.scene.record_nav_perf_caused(
|
||||
crate::scene::NavPerfOp::Edit,
|
||||
perf_label,
|
||||
started,
|
||||
);
|
||||
}
|
||||
}
|
||||
if let Some(started) = perf_started {
|
||||
|
||||
Reference in new issue
Block a user