Skip to content

![high](https://www.gstatic.com/codereviewagent/high-priority.svg) #192

@huhdy32

Description

@huhdy32

high

댓글 목록을 순회하며 각 댓글마다 memberClient.getMemberInfo()를 호출하고 있어 댓글 수(N)만큼 API 호출이 발생하는 N+1 문제가 있습니다. 이로 인해 성능 저하가 발생할 수 있습니다. 모든 댓글의 memberId를 수집하여 한 번의 배치(batch) API 호출로 모든 회원 정보를 가져온 후, 메모리에서 매핑하는 방식으로 리팩토링하는 것을 권장합니다. 예를 들어, memberClientgetMemberInfos(List<Long> memberIds)와 같은 메소드를 추가하여 사용할 수 있습니다.

Originally posted by @gemini-code-assist[bot] in #191 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions