Skip to content

⚡ Bolt: SVG 및 LCP 이미지 초기 렌더링 지연 해소 (decoding 속성 최적화)#81

Open
seonghobae wants to merge 4 commits into
mainfrom
bolt-performance-remove-decoding-async-4721589353191343063
Open

⚡ Bolt: SVG 및 LCP 이미지 초기 렌더링 지연 해소 (decoding 속성 최적화)#81
seonghobae wants to merge 4 commits into
mainfrom
bolt-performance-remove-decoding-async-4721589353191343063

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

💡 What

index.html 내에 렌더링되는 이미지들 중에서 SVG 형식의 이미지와 최상단 LCP(Largest Contentful Paint) 대상(예: fetchpriority="high"가 부여된 Hero 이미지)에서 decoding="async" 속성을 제거했습니다.

🎯 Why

decoding="async"는 브라우저가 이미지 디코딩을 메인 스레드에서 비동기적으로 처리하게 만들어 스크롤 등의 사용자 상호작용 성능을 향상시킵니다. 그러나 다음과 같은 문제가 있습니다.

  1. LCP 이미지: 화면 최상단에 보여야 할 가장 중요한 이미지에 적용하면 디코딩 작업 우선순위가 뒤로 밀리며 시각적 렌더링이 늦어져 성능 저하(FCP, LCP 시간 증가)라는 안티패턴을 유발합니다.
  2. SVG 이미지: SVG는 픽셀(raster) 데이터가 아닌 텍스트 기반의 벡터 XML 데이터입니다. 따라서 브라우저는 디코딩(decoding) 과정을 거치지 않고 파싱(parsing)을 수행하므로 해당 속성은 불필요합니다.

📊 Impact

화면 상단의 주요 이미지들이 불필요한 비동기 지연 없이 즉각적으로 화면에 그려져 초기 체감 로딩 속도(LCP)가 개선됩니다. 또한, SVG 이미지에 불필요하게 부여된 속성을 제거하여 DOM 구조가 간결해집니다.

🔬 Measurement

pytest를 실행하여 .svg로 끝나는 이미지 및 fetchpriority="high"인 이미지에는 해당 속성이 없음을 검증하는 변경된 test_images_decode_without_blocking_rendering 테스트를 통과하는지 확인할 수 있습니다.


PR created automatically by Jules for task 4721589353191343063 started by @seonghobae

- `index.html`에서 SVG 요소 및 `fetchpriority="high"`가 설정된 주요 LCP 이미지에 잘못 적용되어 있던 `decoding="async"` 속성을 제거했습니다.
- SVG는 디코딩이 아닌 파싱 과정을 거치고, LCP 이미지는 렌더링을 지연시킬 경우 성능 저하(FCP, LCP 악화)를 유발하므로 속성 제거가 적절합니다.
- `tests/test_styles.py`의 테스트 코드도 이러한 조건을 엄격히 검증하도록 개선하여, 향후 래스터 이미지에는 지연 디코딩이 적용되면서도 핵심 리소스는 렌더링을 지연하지 않도록 강제했습니다.
- `.jules/bolt.md`에 관련된 성능 관련 학습 내용을 기록했습니다.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant