mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-08 19:32:08 +00:00
Perf: P78 times a hide on every run, showing the layer again untimed first (#7494)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b057e2247
commit
72b53ffebe
1 file changed
+6
-3
@@ -658,10 +658,13 @@ fn full_canvas_layer_scenarios(b: &mut Bench, sz: &Sizes) {
|
||||
g.set_memory_budget(photocraft_ui_egui::gpu_canvas::MIN_GPU_BUDGET);
|
||||
}
|
||||
let _ = b.refresh(&s, true);
|
||||
// Each run is a from-scratch CPU composite of 150 full-canvas layers.
|
||||
b.time(adjust, &mut s, reps.min(5), true, |b, s, i| {
|
||||
// Each run is a from-scratch CPU composite of 150 full-canvas layers. Every timed run
|
||||
// is a hide: the layer is shown again, untimed, before each one.
|
||||
b.time(adjust, &mut s, reps.min(5), true, |b, s, _| {
|
||||
exec(s, "layer.setProps", json!({"layer": adj, "visible": true}))?;
|
||||
b.refresh(s, false)?;
|
||||
let t = Instant::now();
|
||||
exec(s, "layer.setProps", json!({"layer": adj, "visible": i % 2 == 1}))?;
|
||||
exec(s, "layer.setProps", json!({"layer": adj, "visible": false}))?;
|
||||
Ok(ms(t) + b.refresh(s, false)?)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user