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).
This commit is contained in:
2026-08-29 19:51:14 +08:00
parent cbd4ba2442
commit 6fb9a80afc
+7
View File
@@ -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