c24165b8bc
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 |