fix: 모든 광고 로딩이후 광고 계속 로딩하는 문제점.#498
Merged
Merged
Conversation
시간이 지날수록 증가하여 1000 리퀘스트 이상으로 올라갑니다. * 빈 재시도 횟수를 제한합니다. * 타이머 dedupe, 초기 display/refresh 중복 제거,
sdk-kr
approved these changes
Mar 10, 2026
Contributor
sdk-kr
left a comment
There was a problem hiding this comment.
깔끔한 수정입니다! 👍
핵심 개선사항 정리:
-
이벤트 리스너 중복 등록 제거 — 슬롯마다
slotRenderEnded리스너를 등록하던 것을 글로벌 1회 등록 +renderCallbacksMap으로 전환. 리스너 누적으로 인한 메모리/성능 문제 해결. -
빈 광고 재시도 횟수 제한 (최대 3회) — 기존에는 고정 타이머 2개가 무조건 실행되어 빈 슬롯이 계속 refresh를 유발했는데,
emptyRetryCount+emptyRetryTimeout가드로 dedupe 및 횟수 제한. -
display 후 중복 refresh 제거 —
googletag.display()가 이미 초기 광고 요청을 트리거하므로, SPA cooldown + 별도refresh()호출 로직 제거. 이게 10000+ 요청의 주요 원인이었을 것으로 보입니다. -
슬롯 중복 정의 방지 —
mgr.slotsMap.has(item.divId)체크 추가로 동일 div에 슬롯 재정의 차단. -
cleanup 보강 — destroy 시
emptyRetryTimeout정리,renderCallbacks삭제.
LGTM!
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.
시간이 지날수록 증가하여 10000 리퀘스트 이상으로 올라갑니다.
문제 증상 스크린샷
