Đọc layout property (offsetHeight) rồi ngay lập tức ghi style → browser phải recalculate layout liên tục.
Tránh bằng: batch reads trước writes, dùng transform thay top/left, dùng requestAnimationFrame.
Reading a layout property (like offsetHeight) immediately followed by writing a style forces the browser to repeatedly recalculate layout.
Avoid it by: batching all reads before writes, using transform instead of top/left, and using requestAnimationFrame.