pre-ship: resolve the new audio diagnostic gates ONCE instead of per frame
RunSequence and AudioIdleWatcher::Execute run per sequence per frame, so the BT_ATTRBIND_LOG probes added while chasing #99 were calling getenv ~2700x/sec on a 15-sequence mech. Small, but this is the same path the source-pooling fix (#32) just bought 10% of frame time in, and an unset diagnostic should cost nothing. Cached in function-static flags. Pre-ship smoke (combat, 2 kills, a respawn, clean teardown): frame time 7.18 / 8.27 / 8.71 ms -- matches the post-pooling 7.79ms baseline 0 asserts, 0 access violations, 0 audio acquireFails Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
7c08e8bd03
commit
5a1a407ed1
@@ -112,7 +112,8 @@ void
|
||||
{
|
||||
Check(this);
|
||||
Check(audioComponentSocket.GetCurrent());
|
||||
if (getenv("BT_ATTRBIND_LOG")) { static int s_iw=0; if ((s_iw++ % 400)==0)
|
||||
static const int s_idleDiag = (getenv("BT_ATTRBIND_LOG") != 0); // hot path: resolve once
|
||||
if (s_idleDiag) { static int s_iw=0; if ((s_iw++ % 400)==0)
|
||||
DEBUG_STREAM << "[idlewatch] #" << s_iw << " comp="
|
||||
<< (void *)audioComponentSocket.GetCurrent() << std::endl; }
|
||||
audioComponentSocket.GetCurrent()->ReceiveControl(
|
||||
|
||||
Reference in New Issue
Block a user