AX Agent loop 정책을 분리하고 transcript 가상화·성능 계측 구조를 강화한다
Some checks failed
Release Gate / gate (push) Has been cancelled
Some checks failed
Release Gate / gate (push) Has been cancelled
- AgentLoop 검증/문서/compact 정책 메서드를 partial 파일로 분리해 loop 본문의 책임을 줄임 - transcript 렌더에 cache pruning과 deferred scrolling을 적용해 긴 세션의 UI 부담을 낮춤 - AgentPerformanceLogService를 추가해 transcript 렌더와 agent loop 실행 요약을 perf 로그로 남김 - README와 DEVELOPMENT 문서에 2026-04-09 10:08 (KST) 기준 구조 개선 및 계측 이력을 반영함 - 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:
@@ -5536,3 +5536,25 @@ ow + toggle ?쒓컖 ?몄뼱濡??ㅼ떆 ?뺣젹?덈떎.
|
||||
- 구조 효과
|
||||
- transcript 렌더의 변경 포인트가 `계획 생성`과 `실행 적용`으로 명확히 나뉘었다.
|
||||
- 향후 실제 가상화 강화, render batching, incremental diff 정교화 작업을 더 안전하게 진행할 수 있다.
|
||||
|
||||
## 2026-04-09 10:08 (KST)
|
||||
|
||||
- [AgentPerformanceLogService.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/AgentPerformanceLogService.cs)
|
||||
- `%APPDATA%\AxCopilot\perf\performance-YYYY-MM-DD.json`에 transcript 렌더 및 agent loop 성능 로그를 남기는 전용 서비스를 추가했다.
|
||||
- 구조 개선 후 실제 Cowork/Code 세션에서 렌더 시간과 루프 duration을 수치로 확인할 수 있게 해, 향후 병목 판단을 코드 추정이 아니라 로그 기반으로 할 수 있게 했다.
|
||||
- [ChatWindow.TranscriptVirtualization.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.TranscriptVirtualization.cs)
|
||||
- transcript에 보이지 않는 오래된 버블 캐시를 pruning하는 정책을 추가했다.
|
||||
- `_elementCache`가 실행 중 계속 커지는 대신 최근 visible/rendered key 위주로 유지되도록 바꿔, 긴 세션에서 메모리와 visual 재사용 비용을 더 안정적으로 관리하게 했다.
|
||||
- [ChatWindow.TranscriptRendering.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.TranscriptRendering.cs)
|
||||
- `RenderMessages()`에 `Stopwatch` 기반 계측을 추가하고, 렌더 시간이 24ms 이상이거나 스트리밍 중이면 transcript 성능 로그를 남기도록 했다.
|
||||
- 로그 detail에는 `visibleMessages`, `visibleEvents`, `renderedItems`, `hiddenCount`, `lightweight` 여부가 포함돼 transcript 버벅임의 실제 상황을 재현하기 쉬워졌다.
|
||||
- [ChatWindow.xaml](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Views/ChatWindow.xaml)
|
||||
- transcript `ListBox`에 `ScrollViewer.IsDeferredScrollingEnabled`, `VirtualizingPanel.CacheLength`, `VirtualizingPanel.CacheLengthUnit`을 추가해 가상화 리스트 동작을 더 보수적으로 조정했다.
|
||||
- [AgentLoopTransitions.Verification.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AgentLoopTransitions.Verification.cs)
|
||||
- [AgentLoopTransitions.Documents.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AgentLoopTransitions.Documents.cs)
|
||||
- [AgentLoopCompactionPolicy.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AgentLoopCompactionPolicy.cs)
|
||||
- `AgentLoopService`에 몰려 있던 검증 gate, 문서 fallback/후속 실행, post-compaction 정책 메서드를 partial 단위로 분리했다.
|
||||
- 결과적으로 loop 본문은 정책 소비자에 더 가까워졌고, 향후 `claw-code`식 executor/verification/fallback 분해를 더 안전하게 진행할 수 있는 구조가 됐다.
|
||||
- [AgentLoopService.cs](/E:/AX%20Copilot%20-%20Codex/src/AxCopilot/Services/Agent/AgentLoopService.cs)
|
||||
- 루프 finally 단계에서 `run_summary` 성능 로그를 남기도록 보강했다.
|
||||
- iteration 수, tool 호출 수, 토큰 사용량, post-compaction suppression 수치가 함께 기록돼 사내 모델에서 `느린데 왜 느린지`를 나중에 역추적할 수 있다.
|
||||
|
||||
Reference in New Issue
Block a user