perf: 뭉치 영상 생성 프레임 드랍 해결#86
Merged
giljihun merged 1 commit intoFeb 11, 2026
Hidden character warning
The head ref may contain hidden characters: "bugfix/-\ubb49\uce58\ud0a4\ub9c1-\uc601\uc0c1\ucd94\ucd9c-\uc601\uc0c1-\uc885\ub8cc-\uc2dc\uc5d0-\uae09\uaca9\ud55c-\ud504\ub808\uc784\ub4dc\ub78d-\ud655\uc778-\uc544\ub9c8-\uc2a4\uc719-\uc774\ud6c4\uc778\ub4ef"
Merged
Conversation
- 파티클 프리렌더링: 매 프레임 Lottie 렌더링 → 시작 시 모든 프레임 미리 렌더링 - 그림자 비활성화: 영상 생성 시 CIGaussianBlur 그림자 효과 스킵 - UIGraphicsImageRenderer 재사용으로 메모리 효율 개선
jini-coding
approved these changes
Feb 11, 2026
| /// - offsetY: Y축 오프셋 (기본값 -8) | ||
| /// - blurRadius: Gaussian Blur 강도 (기본값 5.0) | ||
| private func addShadowToNode(_ node: SKSpriteNode, offsetX: CGFloat = 8, offsetY: CGFloat = -8, blurRadius: CGFloat = 5.0) { | ||
| // 영상 생성 시 그림자 비활성화 (성능 최적화) |
Member
There was a problem hiding this comment.
영상 만드는데 그림자가 좀 무거웠나보네요 조금 아쉽긴 하지만 편의성을 위해서 조금 덜고 가는게 맞을 것 같네요.
| } | ||
|
|
||
| /// 파티클 시작 | ||
| /// 파티클 시작 (모든 프레임을 프리렌더링) |
Member
There was a problem hiding this comment.
뭐든 미리 준비해두는게 빠르네요ㅋㅋㅋㅋ 굿! 확실히 많이 매끄러워졌어요.
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.
🎯 PR 내용
뭉치 영상 생성 시 후반부로 갈수록 심해지던 프레임 드랍 현상 해결
특히 스윙 이후 급격히 느려지던 문제
결론먼저, 핵심 원인은 "그림자 효과" (CIGaussianBlur)
1. 그림자 비활성화 (핵심 원인)
Before
매 프레임마다 Ring, Chain(5~6개), Body, Carabiner 각각에
CIGaussianBlur그림자 렌더링!!!After: 영상 생성 시
disableShadows = true플래그로 그림자 스킵아래 내용들 먼저, 수행을 해봤는데 (키링 영상 추출과 최대한 다시 비슷하게)
변화가 미미해서, 그림자를 제거해봤는데 그냥 바로 좋아짐.
사실 영상에선 그림자가 불필요하기도하고, 그냥 뷰의 shadow가 아닌 로직이다보니
영상으로 렌더링하기에는 너무 무거움
2. 파티클 프리렌더링
Before
파티클 재생 중 매 프레임마다 Lottie → UIImage → SKTexture 변환
After
파티클 시작 시점에 모든 프레임을 미리 렌더링해서 배열에 저장
3. UIGraphicsImageRenderer 재사용
Before
매 프레임마다 새로운 renderer 생성
After
하나의 renderer를 만들어서 모든 프레임에 재사용
📱 스크린샷 (UI 변경 시)
ScreenRecording_02-11-2026.16-02-29_1.MP4
🔗 관련 이슈
✅ 체크리스트