"매 main thread 매 free 매 fast UI". CPU overhead는 JS execution / parsing / hydration / re-render에 소비되는 main-thread time — 이게 길어지면 INP가 무너지고 user input이 lag한다. 2026 INP가 LCP를 대체한 third Core Web Vital이 되어 CPU profile + scheduling이 frontend 의 first concern.
매 핵심
매 source
Parse + compile: download된 JS bytes → AST → bytecode (V8 측정 시 KB 당 ~1ms low-end mobile).
// X — 매 read after write 매 force reflow
els.forEach(el=>{el.style.width='100px';console.log(el.offsetWidth);// forced sync layout
});// O — 매 batch read, batch write
constwidths=els.map(el=>el.offsetWidth);els.forEach((el,i)=>el.style.width=widths[i]+1+'px');