requestAnimationFrame + setTimeout Jan 13, 2023 tl;dr: This is how you correctly measure performance after style, layout, and paint operations. requestAnimationFrame(() => { setTimeout(() => { performance.mark("end"); }, 0); });