docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,198 @@
|
||||
---
|
||||
id: wiki-2026-0508-초기-로드-시간-initial-load-time
|
||||
title: 초기 로드 시간 (Initial Load Time)
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Initial Load Time, TTI, FCP, LCP]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [performance, web-vitals, optimization, frontend]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: TypeScript
|
||||
framework: 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)
|
||||
```tsx
|
||||
// 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
|
||||
```tsx
|
||||
// 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
|
||||
```tsx
|
||||
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
|
||||
```html
|
||||
<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
|
||||
/* CSS — FOUT 방지 */
|
||||
@font-face {
|
||||
font-family: 'Inter';
|
||||
src: url('/fonts/inter.woff2') format('woff2');
|
||||
font-display: swap; /* 매 fallback 의 즉시 show */
|
||||
}
|
||||
```
|
||||
|
||||
### Bundle 분석 (Vite)
|
||||
```bash
|
||||
# vite-bundle-visualizer
|
||||
npx vite-bundle-visualizer
|
||||
|
||||
# Next.js
|
||||
ANALYZE=true next build
|
||||
```
|
||||
|
||||
### Critical CSS inline
|
||||
```js
|
||||
// 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
|
||||
```js
|
||||
// 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
|
||||
- 부모: [[Performance Optimization]] · [[Core Web Vitals Optimization (INP, LCP, CLS)|Core Web Vitals]]
|
||||
|
||||
## 🤖 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 |
|
||||
Reference in New Issue
Block a user