
Hacker News0 Hot2 phút
Are you telling me a readonly property is wrecking my performance?
A developer debugging performance issues in Letta Desktop discovered that accessing scrollHeight triggers a style and layout recalculation in the browser engine (forced reflow), not a simple property read. The Chromium source code confirms this: scrollHeight calls UpdateStyleAndLayoutForNode every time it is accessed. The fix was to avoid computing a precise scroll target and instead set scrollTop to a large static number, letting the browser clamp it naturally.