Skip to content

perf(web): 홈 번들 축소(gsap 제외)·fetch 워터폴 제거·죽은 코드 정리#946

Merged
cocoyoon merged 2 commits into
devfrom
perf/home-render-cleanup
Jul 12, 2026
Merged

perf(web): 홈 번들 축소(gsap 제외)·fetch 워터폴 제거·죽은 코드 정리#946
cocoyoon merged 2 commits into
devfrom
perf/home-render-cleanup

Conversation

@cocoyoon

Copy link
Copy Markdown
Member

Summary

홈 렌더 관련 번들·데이터 정리 (ISR #944 의 컴패니언). FCP/LCP 는 로컬 측정상 노이즈 수준이었으나, ISR 로 셸이 즉시 뜨는 지금은 클라이언트 번들 축소(-72KB, 대부분 gsap) 가 하이드레이션/TTI 에 더 유의미.

Changes

  • hero fetch 워터폴 제거: fetchHeroSlides 를 기존 Promise.all 에 합류(6개 백엔드 호출 병렬화). ISR revalidation 렌더도 그만큼 단축.
  • gsap 홈 번들 제외: ConditionalNavSmartNav(gsap 정적 import)를 next/dynamic 으로 전환 → shell/home 라우트에서 gsap 미로드(측정: 홈 gsap 청크 1개 68KB → 0).
  • next.config.js: optimizePackageImports(design-system barrel, motion).
  • ReactQueryDevtools dev-only dynamic import(프로덕션 번들 제외) + AuthProvider 잔여 console.log 제거.
  • 죽은 코드 제거(어디서도 import 안 됨, gsap/three/ogl 사용): main-renewal/*(SmartNav 제외), BookshelfView/ShelfRow/IssueSpine, CircularGallery, useItemCardGSAP/useImageModalAnimation(+테스트).

HomeShell 을 Server Component 로 바꾸는 시도는 FCP/LCP 회귀(로컬 A/B 실측)로 되돌림 — 2번째 커밋(squash 시 요약에 반영).

Test Plan

cocoyoon and others added 2 commits July 13, 2026 00:56
…code cleanup

- Fold fetchHeroSlides into the existing Promise.all in the home page
  loader instead of awaiting it afterward, removing a full round-trip
  from server TTFB for the above-the-fold hero.
- Convert HomeShell to a Server Component: extract GreetingRow (time-based
  greeting) and the usePersonalizationAvailable check into small client
  leaves, so DiscoveryBrowse and its rails render server-side and only
  hydrate the pieces that are actually interactive.
- Add experimental.optimizePackageImports for the design-system barrel,
  and dynamically import SmartNav in ConditionalNav so gsap no longer
  ships to routes (including home) where SmartNav never renders.
- Gate ReactQueryDevtools behind a dev-only dynamic import and drop a
  stray AuthProvider console.log.
- Remove confirmed-orphaned gsap/three/ogl code with no remaining
  importers: main-renewal's legacy redesign components (HeroCard,
  MasonryGrid/Item, MainHero, HeroCover, EditorialMagazine, its barrel),
  the Bookshelf/ShelfRow/IssueSpine chain, CircularGallery, and the
  useItemCardGSAP/useImageModalAnimation hooks (plus its now-orphaned test).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…/LCP regression

Bisected via before/after Lighthouse (throttled, interleaved, median of
4 runs) after the user asked how much the home render-speed work
actually improved things. Converting HomeShell/DiscoveryBrowse to a
Server Component looked correct in principle (less client JS) but
measured worse in practice: +150ms FCP, +700-900ms LCP versus the
original client-rendered version, most likely because serializing the
many server-rendered rail/card elements through the RSC flight payload
costs more than what's saved by not shipping that code as client JS —
passing `home` as a plain prop to a client component that maps over it
itself is cheaper here. Reverting HomeShell.tsx/GreetingRow.tsx/
PersonalizationSlot.tsx back to the original single-file client
component; keeping the hero fetch parallelization, SmartNav dynamic
import, and dead-code removal from the same effort, which measured
cleanly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
decoded-app Ready Ready Preview, Comment Jul 12, 2026 4:00pm

@thxforall thxforall moved this from Todo to In Progress in decoded-monorepo Jul 12, 2026
@cocoyoon
cocoyoon merged commit 6a60a62 into dev Jul 12, 2026
9 of 10 checks passed
@cocoyoon
cocoyoon deleted the perf/home-render-cleanup branch July 12, 2026 16:30
@github-project-automation github-project-automation Bot moved this from In Progress to Done in decoded-monorepo Jul 12, 2026
github-actions Bot pushed a commit that referenced this pull request Jul 12, 2026
cocoyoon added a commit that referenced this pull request Jul 12, 2026
release: dev → main — Library hotfix(#947) + 홈 번들·정리(#946)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants