From 6fb9a80afcdcfb3ab9f3f7ed378553cad3ac7352 Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Sat, 29 Aug 2026 19:51:14 +0800 Subject: [PATCH] build: silence wgpu-core's debug-only snatch-lock backtrace capture wgpu-core 29's snatch lock tracing (snatch.rs) captures a std Backtrace on every device/queue lock acquisition when debug_assertions are on. Profiling the dev build showed ~35% of UI-thread CPU in _Unwind_Find_FDE/Backtrace::create, which starved playback-audio chunk scheduling (late chunks are dropped -> pops). --- Cargo.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index bfd67f2b4..e2f616e6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,5 +58,12 @@ panic = "unwind" [profile.dev.package."*"] opt-level = 1 +# wgpu-core's debug-only "snatch lock" tracing captures a std Backtrace on +# EVERY device/queue lock acquisition (wgpu-core/src/snatch.rs), which cost +# ~35% of UI-thread CPU in profiling (perf: _Unwind_Find_FDE + Backtrace::create) +# and starved playback-audio chunk scheduling (late chunks get dropped → pops). +[profile.dev.package.wgpu-core] +debug-assertions = false + [profile.dev] opt-level = 1