Refactor/code optimization#19
Closed
Juhyeok0603 wants to merge 2 commits into
Closed
Conversation
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.
지금까지 ExtS3-Demo에서 동기 → 비동기 HTTP로 바꾼 건 크게 2개 영역입니다.
파일:
search.py (line 138)
chrome_name.py (line 204)
chrome_id.py (line 232)
vscode_name.py (line 30)
vscode_id.py (line 55)
바뀐 내용:
requests.get() 기반 검색/상세 조회를 httpx.AsyncClient 기반 함수로 추가
이름 검색 후 ID별 상세 정보 조회를 asyncio.gather(...)로 병렬 처리
기존 run_in_executor(...) 제거
동시 상세 조회 개수는 SEARCH_DETAIL_CONCURRENCY, 기본 12
Chrome/VSCode 검색 모두 적용
파일:
nexus_repo.py (line 67)
바뀐 내용:
/api/nexus/list
run_in_threadpool(fetch_nexus_assets) → httpx.AsyncClient 기반 fetch_nexus_assets_async()
/api/nexus/exists
run_in_threadpool(fetch_nexus_assets_by_name, ...) → fetch_nexus_assets_by_name_async()
후보 파일명 검색을 asyncio.gather(...)로 병렬 처리
/api/nexus/dashboard
run_in_threadpool(fetch_dashboard_payload) → fetch_dashboard_payload_async()
assets 조회와 blobstore 조회를 asyncio.gather(...)로 병렬 처리
기존 캐시는 유지
아직 안 바꾼 것:
Nexus 다운로드 스트리밍
Nexus 업로드
AI judgment / Ollama 호출
DB 관련 psycopg2
suppressor 쪽 무거운 분석 작업들
ㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡㅡ
여기에 suppressor에서 자동으로 approve 되는 거 뺐음