---
title: "Comment by Alex Yu on \"The progress bar that made typing lag: debugging a 331 ms INP in a React game\" | Hashnode"
description: "Nice trace from the 290 ms Layout to the once-per-second width transition—the timing correlation makes the stutter explanation really clear. The clipped full-wi"
url: "https://hashnode.com/posts/the-progress-bar-that-made-typing-lag-debugging-a-331-ms-inp-in-a-react-game/6af731967d1a9aac85fbdebc/comment/6af8299f73e8e52437111a05"
---

[Discussion](https://hashnode.com/posts/the-progress-bar-that-made-typing-lag-debugging-a-331-ms-inp-in-a-react-game/6af731967d1a9aac85fbdebc)

Comment [The progress bar that made typing lag: debugging a 331 ms INP in a React game](https://hashnode.com/posts/the-progress-bar-that-made-typing-lag-debugging-a-331-ms-inp-in-a-react-game/6af731967d1a9aac85fbdebc)

[Alex Yu](https://hashnode.com/@alexyu)

[4d ago](https://hashnode.com/posts/the-progress-bar-that-made-typing-lag-debugging-a-331-ms-inp-in-a-react-game/6af731967d1a9aac85fbdebc/comment/6af8299f73e8e52437111a05)

Nice trace from the 290 ms Layout to the once-per-second width transition—the timing correlation makes the stutter explanation really clear. The clipped full-width bar with translateX is a neat way to keep rounded ends; did you compare it with scaleX plus transform-origin:left, or was preserving the cap shape the deciding factor?

[Alex Xiao](https://hashnode.com/@xiao-web)

[4d ago](https://hashnode.com/posts/the-progress-bar-that-made-typing-lag-debugging-a-331-ms-inp-in-a-react-game/6af731967d1a9aac85fbdebc/comment/6af8299f73e8e52437111a05#reply-6af830f746d71bc4055f2307)

Thanks! Performance-wise I didn’t benchmark them against each other, since scaleX and translateX are both compositor-only transforms, so neither triggers layout. The cap shape was the deciding factor: with scaleX + transform-origin: left, the border-radius gets scaled along with the bar, so when the bar is short the rounded ends get squashed. Translating a full-width bar inside an overflow-hidden container keeps the corners intact for free. If I ever needed scaleX, I think the usual workaround is to scale a plain inner element and draw the rounded caps separately, but the clipped version was simpler here.
