fix: 대시보드 첫 로드 블로킹 해소 — 동기 조회를 스레드로 격리#443
Merged
Merged
Conversation
첫 접속 시 운영 상태(시장 국면 실시간 조회, 동기 네트워크 수십 초 가능)가 aiohttp 이벤트 루프를 잡아 첫 페이지·내 자산·차트까지 전부 함께 멈췄다 (실브라우저 검증에서 스크린샷 타임아웃으로 실측된 문제). 수정: 동기 작업이 섞이는 세 핸들러를 asyncio.to_thread로 격리 - /api/runtime: 시장 국면 실시간 조회 - /api/basket_evaluation: 캐시 미스 시 수집기(TradingHours·잠재 pykrx) - /api/portfolio: live 모드 KIS 잔고 조회 대비 실측(수정 후): /api/runtime 진행 중에도 /api/baskets 53ms, 첫 페이지 23ms — 내 돈 화면은 항상 즉시 뜨고 운영 상태만 나중에 채워진다. 전체 스위트 1638 통과.
easygap
added a commit
that referenced
this pull request
Jul 6, 2026
fix: 대시보드 첫 로드 블로킹 해소 — 동기 조회를 스레드로 격리
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
대시보드 첫 로드 시 화면 전체가 수십 초 멈추던 문제 수정 — 실브라우저 검증(#442)에서 스크린샷 타임아웃으로 실측된 결함입니다.
원인
/api/runtime의 시장 국면 실시간 조회(동기 네트워크)가 aiohttp 이벤트 루프 위에서 실행돼, 그동안 첫 페이지·내 자산·차트 요청까지 전부 대기했습니다.수정
동기 작업이 섞이는 세 핸들러를
asyncio.to_thread로 격리:/api/runtime(시장 국면),/api/basket_evaluation(캐시 미스 시 수집기),/api/portfolio(live 모드 KIS 잔고 대비)실측 (수정 후)
/api/runtime진행 중에 →/api/baskets53ms · 첫 페이지 23ms 응답. 내 돈 화면은 항상 즉시 뜨고, 운영 상태 카드만 준비되는 대로 채워집니다.전체 스위트 1638 통과.