-
Notifications
You must be signed in to change notification settings - Fork 0
이번 주 인기 쇼츠 기능 구현 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
이번 주 인기 쇼츠 기능 구현 #21
Conversation
- structured concurrency 적용
- xcconfig 파일 경로 정리
- ViewBuilder 적용
| let request = ShortsDTO.List.Request(page: 0, size: 10) | ||
| let response = try await shortsClient.popularShorts(request) | ||
|
|
||
| let result = try await withThrowingTaskGroup(of: PopularShorts?.self) { group in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
withThrowingTaskGroup 쓰신 이유가 무엇일까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여러 개의 비동기 작업을 concurrent하게 처리하기 위함입니다.
반복문 안에 await을 사용할 시 해당 작업이 끝난 후 다음 반복문이 serial하게 수행됩니다.
이를 concurrent하게 수행하고 싶어 사용해 보았습니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 각 난이도에 따른 레벨 표시(V1, V3 등) 값을 알기 위해 추가적인 API 호출이 필요한 상황입니다..!
형욱님이 알려주신 부분은 쇼츠 썸네일 정보를 위해 과다한 API 호출이 이루어진다는 점인 것으로 이해됩니다.
그 부분 저도 동의하고 있습니다~ API 호출을 최대한 줄이고 싶은데, 현재 쇼츠 API 구성의 한계로 인해 이렇게 구현하였습니다 ㅜㅜ
혹시 더 좋은 방법이 있을까요?

close #19
📓 Overview
🤔 고민 내용
📸 Screenshot