9148c358d0
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 폴더 제거.
5.6 KiB
5.6 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-브라우저-렌더링-프로세스-crp | 브라우저 렌더링 프로세스 (CRP) | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
브라우저 렌더링 프로세스 (CRP)
매 한 줄
"매 byte → pixel 의 6-stage pipeline". CRP는 HTML/CSS/JS bytes 가 actual pixels 가 되기 전 거치는 parse → DOM/CSSOM → Render Tree → Layout → Paint → Composite 단계. 매 stage 차단/지연 의 LCP, INP regression 의 root cause.
매 핵심
매 6-stage pipeline
- Parse: HTML byte stream → token → DOM. CSS bytes → CSSOM (render-blocking).
- Render Tree: DOM + CSSOM merge,
display:none제외. - Layout (Reflow): 매 element 의 geometric box (x, y, w, h) 계산.
- Paint: pixels 의 layer 별 raster (text, color, image, shadow).
- Composite: GPU 의 layer 합성 —
transform,opacity만 매 단계 처리 가능.
매 차단 요소
- CSS 매 default render-blocking —
<head>의 위치 의 영향. <script>매 default parser-blocking —defer/async의 회피.- Synchronous JS 매 layout 강제 (forced reflow / layout thrashing).
매 응용
- LCP 최적화 — critical CSS inline + preload hero image.
- INP 최적화 — long task 분할,
requestIdleCallback활용. - Composite-only animation —
transform/opacity만 60fps 보장.
💻 패턴
Critical CSS inline (LCP < 2.5s)
<head>
<style>
/* Above-the-fold critical CSS only */
body { margin: 0; font: 16px/1.5 system-ui; }
.hero { height: 100vh; background: #0a0a0a; }
</style>
<link rel="preload" href="/fonts/inter.woff2" as="font" crossorigin>
<link rel="stylesheet" href="/full.css" media="print" onload="this.media='all'">
</head>
Defer non-critical JS
<!-- parse 안 차단 — DOM 완료 후 실행 -->
<script defer src="/app.js"></script>
<!-- 매 즉시 download but execution 매 비동기 -->
<script async src="/analytics.js"></script>
Layout thrashing 회피
// 매 안 좋은 패턴 — read/write interleave 의 N forced reflow
boxes.forEach(box => {
const w = box.offsetWidth; // read (force layout)
box.style.width = (w * 2) + 'px'; // write (invalidate)
});
// 매 fix — batch read, batch write
const widths = boxes.map(b => b.offsetWidth); // batch read
boxes.forEach((b, i) => b.style.width = widths[i] * 2 + 'px'); // batch write
Composite-only animation
/* 매 GOOD — GPU compositor 의 처리, layout/paint skip */
.slide {
transform: translateX(0);
transition: transform 200ms ease-out;
will-change: transform; /* hint to compositor */
}
.slide.active { transform: translateX(100%); }
/* 매 BAD — 매 frame 의 layout + paint 야기 */
.slide-bad {
left: 0;
transition: left 200ms;
}
CSS containment (scope reflow)
.card {
contain: layout style paint; /* 매 card 의 reflow 가 outer 에 전파 안 됨 */
content-visibility: auto; /* offscreen skip */
}
INP 최적화 — yield to main thread
async function processLargeList(items) {
for (let i = 0; i < items.length; i++) {
process(items[i]);
if (i % 50 === 0) {
await new Promise(r => setTimeout(r, 0)); // yield
}
}
}
// 매 modern API (2026)
function yieldToMain() {
return scheduler.yield ? scheduler.yield() : new Promise(r => setTimeout(r));
}
PerformanceObserver — measure CRP
new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(entry.name, entry.startTime, entry.duration);
}
}).observe({ type: 'largest-contentful-paint', buffered: true });
new PerformanceObserver((list) => {
for (const e of list.getEntries()) {
if (e.duration > 50) console.warn('Long task:', e);
}
}).observe({ type: 'longtask', buffered: true });
매 결정 기준
| 상황 | Approach |
|---|---|
| Hero image LCP 느림 | <link rel=preload> + fetchpriority=high |
| Animation jank | transform/opacity 만, will-change hint |
| 큰 list scroll lag | content-visibility: auto |
| Form input INP > 200ms | scheduler.yield(), debounce |
| Third-party script blocking | async + Partytown |
기본값: defer non-critical JS, inline critical CSS, composite-only animation.
🔗 Graph
- 부모: Web Performance · Core Web Vitals Optimization (INP, LCP, CLS)
- 변형: Server Side Rendering (SSR) · Streaming SSR
🤖 LLM 활용
언제: jank/LCP/INP 회귀 진단, animation 최적화, third-party script 영향 분석. 언제 X: 매 framework-specific reactivity (React reconciler) 매 별도 layer — CRP 만 으로 안 풀림.
❌ 안티패턴
document.write사용: parser block, modern browser 의 무시.- synchronous XHR: main thread block, INP 파괴.
- inline script after CSS: CSSOM wait 의 parser stall.
- animate
width/top: 매 frame layout — composite-only 만 사용. @importin CSS: serialize CSS download —<link>의 사용.
🧪 검증 / 중복
- Verified (web.dev — Critical Rendering Path, Chrome DevTools Performance panel docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — CRP 6-stage pipeline + LCP/INP patterns |