전체 코드 오류와 성능 병목을 점검하고 핵심 핫패스를 정리한다
Some checks failed
Release Gate / gate (push) Has been cancelled

- 런처 색인에서 임시 파일, 숨김/시스템 경로, Office 임시 파일을 감시와 색인 대상에서 제외해 불필요한 재색인과 디스크 I/O를 줄인다

- AX Agent 표현 수준 저장값이 매번 rich로 덮어쓰이던 버그를 수정해 balanced/simple/rich 설정이 실제로 유지되게 한다

- 최소화/숨김 상태의 AX Agent 창은 transcript 재렌더를 지연했다가 다시 보일 때 한 번만 처리하고, 런처 인덱스 상태 타이머도 재사용하도록 바꿔 백그라운드 오버헤드를 줄인다

- 검증: dotnet build src/AxCopilot/AxCopilot.csproj -c Release -v minimal -p:OutputPath=bin\\verify\\ -p:IntermediateOutputPath=obj\\verify\\ (경고 0, 오류 0)
This commit is contained in:
2026-04-06 23:19:02 +09:00
parent 30e8218ba4
commit 45dfa70951
6 changed files with 112 additions and 24 deletions

View File

@@ -37,6 +37,7 @@ public partial class ChatWindow : Window
private double _sidebarExpandedWidth = 262;
private bool _isInWindowMoveSizeLoop;
private bool _pendingResponsiveLayoutRefresh;
private bool _pendingHiddenExecutionHistoryRender;
private CacheMode? _cachedRootCacheModeBeforeMove;
private string _selectedCategory = ""; // "" = 전체
private readonly Dictionary<string, string> _tabSelectedCategory = new(StringComparer.OrdinalIgnoreCase)
@@ -223,7 +224,7 @@ public partial class ChatWindow : Window
_elapsedTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
_elapsedTimer.Tick += ElapsedTimer_Tick;
_typingTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(12) };
_typingTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(20) };
_typingTimer.Tick += TypingTimer_Tick;
_gitRefreshTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(450) };
_gitRefreshTimer.Tick += async (_, _) =>
@@ -237,14 +238,14 @@ public partial class ChatWindow : Window
_conversationSearchTimer.Stop();
RefreshConversationList();
};
_inputUiRefreshTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(90) };
_inputUiRefreshTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(120) };
_inputUiRefreshTimer.Tick += (_, _) =>
{
_inputUiRefreshTimer.Stop();
RefreshContextUsageVisual();
RefreshDraftQueueUi();
};
_executionHistoryRenderTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(120) };
_executionHistoryRenderTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(180) };
_executionHistoryRenderTimer.Tick += (_, _) =>
{
_executionHistoryRenderTimer.Stop();
@@ -265,7 +266,7 @@ public partial class ChatWindow : Window
_conversationPersistTimer.Stop();
FlushPendingConversationPersists();
};
_agentUiEventTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(90) };
_agentUiEventTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(140) };
_agentUiEventTimer.Tick += (_, _) =>
{
_agentUiEventTimer.Stop();
@@ -279,7 +280,7 @@ public partial class ChatWindow : Window
_tokenUsagePopupCloseTimer.Stop();
CloseTokenUsagePopupIfIdle();
};
_responsiveLayoutTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(90) };
_responsiveLayoutTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(120) };
_responsiveLayoutTimer.Tick += (_, _) =>
{
_responsiveLayoutTimer.Stop();
@@ -307,6 +308,8 @@ public partial class ChatWindow : Window
if (TokenUsagePopup != null)
TokenUsagePopup.IsOpen = false;
};
IsVisibleChanged += (_, _) => FlushDeferredUiRefreshIfNeeded();
StateChanged += (_, _) => FlushDeferredUiRefreshIfNeeded();
UpdateConversationFailureFilterUi();
UpdateConversationSortUi();
UpdateConversationRunningFilterUi();
@@ -5651,10 +5654,28 @@ public partial class ChatWindow : Window
private void ScheduleExecutionHistoryRender(bool autoScroll = true)
{
_pendingExecutionHistoryAutoScroll |= autoScroll;
if (!IsLoaded || !IsVisible || WindowState == WindowState.Minimized)
{
_pendingHiddenExecutionHistoryRender = true;
return;
}
_executionHistoryRenderTimer.Stop();
_executionHistoryRenderTimer.Start();
}
private void FlushDeferredUiRefreshIfNeeded()
{
if (!IsLoaded || !IsVisible || WindowState == WindowState.Minimized)
return;
if (_pendingHiddenExecutionHistoryRender)
{
_pendingHiddenExecutionHistoryRender = false;
_executionHistoryRenderTimer.Stop();
_executionHistoryRenderTimer.Start();
}
}
private void ScheduleTaskSummaryRefresh()
{
_taskSummaryRefreshTimer.Stop();
@@ -6241,13 +6262,14 @@ public partial class ChatWindow : Window
: 0L;
var inputTokens = Math.Max(0, _agentCumulativeInputTokens);
var outputTokens = Math.Max(0, _agentCumulativeOutputTokens);
var currentElapsedBucket = (_liveAgentProgressHint?.ElapsedMs ?? 0) / 1000;
var nextElapsedBucket = elapsedMs / 1000;
var currentElapsedBucket = (_liveAgentProgressHint?.ElapsedMs ?? 0) / 3000;
var nextElapsedBucket = elapsedMs / 3000;
var currentTokenBucket = ((_liveAgentProgressHint?.InputTokens ?? 0) + (_liveAgentProgressHint?.OutputTokens ?? 0)) / 500;
var nextTokenBucket = (inputTokens + outputTokens) / 500;
if (string.Equals(currentSummary, normalizedSummary, StringComparison.Ordinal)
&& string.Equals(currentToolName, toolName, StringComparison.Ordinal)
&& currentElapsedBucket == nextElapsedBucket
&& (_liveAgentProgressHint?.InputTokens ?? 0) == inputTokens
&& (_liveAgentProgressHint?.OutputTokens ?? 0) == outputTokens)
&& currentTokenBucket == nextTokenBucket)
return;
_liveAgentProgressHint = normalizedSummary == null