Files
2nd/10_Wiki/Topics/AI_and_ML/초기 로드 시간 (Initial Load Time).md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

5.9 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-초기-로드-시간-initial-load-time 초기 로드 시간 (Initial Load Time) 10_Wiki/Topics verified self
Initial Load Time
TTI
FCP
LCP
none A 0.9 applied
performance
web-vitals
optimization
frontend
2026-05-10 pending
language framework
TypeScript Next.js / React

초기 로드 시간 (Initial Load Time)

매 한 줄

"매 첫 paint 의 1.8s, 매 TTI 의 3.5s 미만 — 매 user 의 stay 의 결정.". 매 Core Web Vitals (LCP, FID/INP, CLS) 의 Google ranking signal 화 (2021) 이후, 매 initial load 의 SEO + UX dual concern. 매 2026 의 modern stack — RSC streaming, edge SSR, Vite 5, Bun bundler — 의 sub-second TTI 의 가능.

매 핵심

매 측정 지표

  • FCP (First Contentful Paint): 매 첫 DOM content 의 paint — target < 1.8s.
  • LCP (Largest Contentful Paint): 매 largest above-fold element 의 render — target < 2.5s.
  • TTI (Time to Interactive): 매 main thread 의 idle + listener 의 attach — target < 3.5s.
  • TBT (Total Blocking Time): 매 long task (>50ms) 의 합 — target < 200ms.
  • INP (Interaction to Next Paint): 매 FID 의 successor (2024 Web Vitals) — target < 200ms.

매 bottleneck 의 source

  • 매 JavaScript bundle 의 크기 (>200KB gzipped 의 red flag).
  • 매 render-blocking CSS / synchronous script.
  • 매 unoptimized image (WebP / AVIF 의 미사용).
  • 매 N+1 API call (waterfall fetch).
  • 매 third-party script (analytics, ads) 의 main thread 점유.

매 응용

  1. E-commerce: 매 100ms 의 latency 의 1% conversion drop (Amazon study).
  2. Media site: 매 LCP 의 SEO ranking 의 직접 영향.
  3. SaaS dashboard: 매 TTI 의 user retention 의 결정.

💻 패턴

Code splitting (Next.js)

// app/dashboard/page.tsx
import dynamic from 'next/dynamic';

const HeavyChart = dynamic(() => import('@/components/HeavyChart'), {
  loading: () => <Skeleton />,
  ssr: false, // client-only 의 heavy component
});

export default function Dashboard() {
  return (
    <div>
      <Header />
      <HeavyChart />
    </div>
  );
}

React Server Components streaming

// app/page.tsx — RSC 의 streaming
import { Suspense } from 'react';

export default function Page() {
  return (
    <>
      <Header /> {/* immediate */}
      <Suspense fallback={<Skeleton />}>
        <SlowDataFetch /> {/* streamed when ready */}
      </Suspense>
    </>
  );
}

async function SlowDataFetch() {
  const data = await fetch('https://api/slow', { cache: 'force-cache' });
  return <Chart data={await data.json()} />;
}

Image optimization

import Image from 'next/image';

<Image
  src="/hero.jpg"
  width={1200}
  height={630}
  priority // LCP candidate
  placeholder="blur"
  blurDataURL={blurUrl}
  sizes="(max-width: 768px) 100vw, 1200px"
/>

Resource hints

<head>
  <link rel="preconnect" href="https://api.example.com" />
  <link rel="dns-prefetch" href="https://cdn.example.com" />
  <link rel="preload" as="font" href="/fonts/inter.woff2" crossorigin />
  <link rel="modulepreload" href="/_next/static/chunks/main.js" />
</head>

Font loading

/* CSS — FOUT 방지 */
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-display: swap; /* 매 fallback 의 즉시 show */
}

Bundle 분석 (Vite)

# vite-bundle-visualizer
npx vite-bundle-visualizer

# Next.js
ANALYZE=true next build

Critical CSS inline

// Next.js — 매 default 로 critical CSS 의 extract
// Vite — vite-plugin-critical 의 use
import { defineConfig } from 'vite';
import critical from 'rollup-plugin-critical';

export default defineConfig({
  plugins: [critical({ criticalBase: 'dist/', criticalPages: [{ uri: '', template: 'index' }] })],
});

Service Worker caching

// public/sw.js
self.addEventListener('fetch', (event) => {
  if (event.request.destination === 'image') {
    event.respondWith(
      caches.open('images').then((cache) =>
        cache.match(event.request).then((cached) => cached || fetch(event.request).then((res) => {
          cache.put(event.request, res.clone());
          return res;
        }))
      )
    );
  }
});

매 결정 기준

상황 Approach
매 SEO-critical page SSR / SSG (Next.js, Astro)
매 dashboard (auth-gated) CSR + skeleton
매 content site Astro islands / 11ty static
매 large bundle (>500KB) code splitting + lazy load
매 LCP > 2.5s image optimization + preload
매 TBT > 300ms main thread offload (Web Worker)

기본값: Next.js 15 RSC + edge runtime + Image component + dynamic import 의 heavy module.

🔗 Graph

🤖 LLM 활용

언제: 매 performance audit 의 explanation, 매 bundle analysis result 의 interpretation, 매 optimization strategy 의 brainstorm. 언제 X: 매 production performance regression 의 진단 — 매 real RUM data + Lighthouse CI 의 use.

안티패턴

  • Render-blocking sync script: 매 <script src> 의 head 위치 + async/defer 의 누락.
  • Unsized image: 매 width/height 의 missing — 매 CLS 의 발생.
  • Hydration mismatch: 매 SSR HTML 과 client render 의 차이 — 매 re-render 의 cost.
  • Bundle bloat: 매 lodash 의 entire import (import _ from 'lodash') 의 사용.
  • Premature optimization: 매 측정 의 없이 의 tweak — 매 RUM data 의 우선.

🧪 검증 / 중복

  • Verified (web.dev/vitals, Next.js docs, Chrome UX Report).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — initial load 의 metrics + Next.js 15 RSC patterns