Load-phase markers: attribute the teal->green minute
The measured 58s uncontended load has ~0.2s of model loads -- the rest is unattributed. Stamp the renderer LoadMission span and count the CheckLoad passes that find the event queue still busy (each delays the ready transition by its 1s re-post), so the next live run names the cost. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
54fd4a4ab0
commit
0ef5a3c4e1
@@ -1369,6 +1369,18 @@ void
|
||||
case CreatingMission:
|
||||
case LoadingMission:
|
||||
case WaitingForLaunch:
|
||||
// LOAD-PHASE MARKER (2026-07-22): each CheckLoad pass that finds the
|
||||
// event queue still busy delays the ready transition by its 1s
|
||||
// re-post -- count them so the teal->green minute is attributable.
|
||||
if (!eventQueue->IsPriorityEmpty(MinEventPriority))
|
||||
{
|
||||
static int s_busy_passes = 0;
|
||||
++s_busy_passes;
|
||||
if ((s_busy_passes % 5) == 1)
|
||||
DEBUG_STREAM << "[loadphase] CheckLoad: event queue still busy"
|
||||
<< " (pass " << s_busy_passes << ") t=" << GetTickCount()
|
||||
<< std::endl << std::flush;
|
||||
}
|
||||
if (eventQueue->IsPriorityEmpty(MinEventPriority))
|
||||
{
|
||||
Host *console_host;
|
||||
|
||||
@@ -9607,6 +9607,23 @@ void DPLRenderer::SetViewAngle(Degree new_angle)
|
||||
void
|
||||
DPLRenderer::LoadMissionImplementation(Mission *mission)
|
||||
{
|
||||
// LOAD-PHASE MARKER (2026-07-22): the teal->green minute is almost all
|
||||
// unattributed (models are ~0.2s of ~58s measured) -- stamp the
|
||||
// renderer-side load so the next run names its share.
|
||||
struct BTPhaseTimer
|
||||
{
|
||||
unsigned long t0;
|
||||
BTPhaseTimer() : t0(GetTickCount())
|
||||
{
|
||||
DEBUG_STREAM << "[loadphase] renderer LoadMission BEGIN t=" << t0
|
||||
<< std::endl << std::flush;
|
||||
}
|
||||
~BTPhaseTimer()
|
||||
{
|
||||
DEBUG_STREAM << "[loadphase] renderer LoadMission END +"
|
||||
<< (GetTickCount() - t0) << "ms" << std::endl << std::flush;
|
||||
}
|
||||
} _phase;
|
||||
Check(this);
|
||||
Tell("DPLVideoRenderer::StartImplementation has been called\n");
|
||||
DPLReadEnvironment(mission);
|
||||
|
||||
Reference in New Issue
Block a user