Skip to content

Conversation

@Seol-JY
Copy link
Member

@Seol-JY Seol-JY commented Mar 4, 2025

📌 관련 이슈

✨ PR 세부 내용

사용자 정보 요청 API 내부 쿼리 성능을 개선합니다.

1️⃣ p6spy 세팅

  • 실제 실행된 SQL 쿼리를 로컬 개발 환경에서 확인 할 수 있도록 세팅 진행

2️⃣ 읽지 않은 채팅 개수 API 분리

  • 현재 status 조회 시 참가한 전체 팀 스페이스의 읽지 않은 채팅 개수를 같이 반환하고 있음
  • 팀스페이스별로 읽지 않은 채팅 개수를 가져오는 기능을 분리하여 새로운 API 작성 필요 (예정, 현재는 임시값으로 대체)

3️⃣ N+1 문제 개선

  • 현재 API 호출 한번에 총 2(N+1)쿼리가 발생하고 있음
    사용자의 팀스페이스 목록 조회 -> 각 팀스페이스 정보 조회 -> 각 팀스페이스의 참여자 목록 조회
  • 페치 조인(Fetch Join)과 일괄 집계 쿼리를 도입해 총 2개의 쿼리만 실행되도록 개선 (대략 80% 이상의 쿼리 실행 단축)

@Seol-JY Seol-JY added the 🚀 Performance 성능 향상 label Mar 4, 2025
@Seol-JY Seol-JY requested a review from Junad-Park March 4, 2025 11:49
@Seol-JY Seol-JY self-assigned this Mar 4, 2025
@github-actions
Copy link

github-actions bot commented Mar 4, 2025

📝 Jacoco Test Coverage

Overall Project 60.54% -0.13% 🍏
Files changed 91.39% 🍏

File Coverage
P6SpyEventListener.java 100% 🍏
P6SpyFormatter.java 100% 🍏
P6SpyConfig.java 100% 🍏
TeamspaceService.java 91.63% -2.88%
UserService.java 84.94% 🍏

@github-actions
Copy link

github-actions bot commented Mar 4, 2025

🧪 Test Results

287 tests   287 ✅  13s ⏱️
114 suites    0 💤
114 files      0 ❌

Results for commit 420cf3a.

Copy link
Contributor

@Junad-Park Junad-Park left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@Seol-JY Seol-JY merged commit 59a536e into main Mar 4, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 Performance 성능 향상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants