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.2 KiB
5.2 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-렌더링-최적화-개념-설명-자료 | 렌더링 최적화 개념 설명 자료 | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
렌더링 최적화 개념 설명 자료
매 한 줄
"매 frame 60fps = 16.67ms budget. 매 그 budget 안에서 layout / paint / composite 모두 끝나야 한다". Browser 매 critical rendering path 의 각 단계 (Parse → Style → Layout → Paint → Composite) 의 cost 를 이해하고, 매 reflow 를 최소화하고 GPU compositing layer 로 offload 하는 것이 매 핵심.
매 핵심
매 Critical Rendering Path
- Parse HTML → DOM tree
- Parse CSS → CSSOM
- Style → DOM + CSSOM 합쳐 Render Tree
- Layout (Reflow) → 매 element 의 geometry (x, y, w, h) 계산
- Paint → pixel 채우기 (color, image, shadow)
- Composite → GPU layer 합성
매 비싼 동작 ranking
- Layout (Reflow): 가장 비쌈.
width,height,top,left,font-size변경 → 매 reflow trigger. - Paint: 중간.
color,background,box-shadow변경. - Composite only: 매 cheap.
transform,opacity만 변경 → GPU 에서 처리.
매 응용
- Animation:
transform/opacity만 사용 (composite-only). - Scroll perf: passive event listener,
will-change. - Long list: virtualization (react-window, virtual scroll).
💻 패턴
Composite-only animation (60fps 보장)
/* 매 BAD — reflow 매 frame */
.bad { transition: left 300ms; }
.bad.move { left: 200px; }
/* 매 GOOD — composite only */
.good { transition: transform 300ms; will-change: transform; }
.good.move { transform: translateX(200px); }
Batch DOM read/write (avoid layout thrashing)
// 매 BAD — read/write/read/write → forced sync layout 매번
elements.forEach(el => {
const w = el.offsetWidth; // read (layout)
el.style.width = (w * 2) + 'px'; // write (invalidate)
});
// 매 GOOD — batch read first, then batch write
const widths = elements.map(el => el.offsetWidth); // all reads
elements.forEach((el, i) => {
el.style.width = (widths[i] * 2) + 'px'; // all writes
});
requestAnimationFrame (rAF) for animation
function animate(ts) {
const progress = (ts - start) / 300;
el.style.transform = `translateX(${progress * 200}px)`;
if (progress < 1) requestAnimationFrame(animate);
}
let start;
requestAnimationFrame(t => { start = t; animate(t); });
Virtual list (long scrollable)
// react-window pattern
import { FixedSizeList } from 'react-window';
<FixedSizeList height={600} itemCount={100000} itemSize={40} width={400}>
{({ index, style }) => <div style={style}>Row {index}</div>}
</FixedSizeList>
IntersectionObserver (lazy image)
const io = new IntersectionObserver(entries => {
entries.forEach(e => {
if (e.isIntersecting) {
e.target.src = e.target.dataset.src;
io.unobserve(e.target);
}
});
});
document.querySelectorAll('img[data-src]').forEach(img => io.observe(img));
CSS containment
/* 매 reflow scope 를 element 안으로 제한 */
.card { contain: layout paint; }
.list-item { content-visibility: auto; contain-intrinsic-size: 40px; }
Debounce expensive resize
let raf;
window.addEventListener('resize', () => {
cancelAnimationFrame(raf);
raf = requestAnimationFrame(() => recomputeLayout());
});
매 결정 기준
| 상황 | Approach |
|---|---|
| micro-animation | transform / opacity + will-change |
| 1000+ list items | virtualize (react-window) |
| 화면 밖 image | loading="lazy" 또는 IntersectionObserver |
| heavy paint area | contain: paint |
| scroll jank | passive listener, content-visibility |
기본값: 매 transform/opacity animation + virtualize long list + lazy load images.
🔗 Graph
- 부모: Frontend_Performance · Web_Vitals
- 변형: Reflow_and_Repaint · Compositing
- 응용: Lazy Loading
- Adjacent: Core Web Vitals Optimization (INP, LCP, CLS) · LCP · INP · CLS
🤖 LLM 활용
언제: 60fps 안 나오는 페이지 진단, scroll jank, animation stutter, slow LCP. 언제 X: server-side rendering bottleneck (그건 SSR 영역).
❌ 안티패턴
!important남용 으로 specificity battle: 매 style recalc 비용 증가.- inline style 매번 직접 set: 매 batch 안 됨, layout thrash.
onscroll안에서 무거운 작업: 매 throttle / rAF 필요.transform없이top/left로 animation: 매 매 frame reflow.
🧪 검증 / 중복
- Verified (web.dev rendering performance guide, MDN, Chrome DevTools docs).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — critical rendering path + reflow/composite optimization patterns |