"매 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.
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.5system-ui;}.hero{height:100vh;background:#0a0a0a;}</style><linkrel="preload"href="/fonts/inter.woff2"as="font"crossorigin><linkrel="stylesheet"href="/full.css"media="print"onload="this.media='all'"></head>
Defer non-critical JS
<!-- parse 안 차단 — DOM 완료 후 실행 --><scriptdefersrc="/app.js"></script><!-- 매 즉시 download but execution 매 비동기 --><scriptasyncsrc="/analytics.js"></script>
Layout thrashing 회피
// 매 안 좋은 패턴 — read/write interleave 의 N forced reflow
boxes.forEach(box=>{constw=box.offsetWidth;// read (force layout)
box.style.width=(w*2)+'px';// write (invalidate)
});// 매 fix — batch read, batch write
constwidths=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:transform200msease-out;will-change:transform;/* hint to compositor */}.slide.active{transform:translateX(100%);}/* 매 BAD — 매 frame 의 layout + paint 야기 */.slide-bad{left:0;transition:left200ms;}
CSS containment (scope reflow)
.card{contain:layoutstylepaint;/* 매 card 의 reflow 가 outer 에 전파 안 됨 */content-visibility:auto;/* offscreen skip */}
INP 최적화 — yield to main thread
asyncfunctionprocessLargeList(items){for(leti=0;i<items.length;i++){process(items[i]);if(i%50===0){awaitnewPromise(r=>setTimeout(r,0));// yield
}}}// 매 modern API (2026)
functionyieldToMain(){returnscheduler.yield?scheduler.yield():newPromise(r=>setTimeout(r));}