# readonly 속성이 성능을 망치고 있다고? scrollHeight의 함정

Original title: Are you telling me a readonly property is wrecking my performance?

> Hacker News story 48849983 · language: ko · submitted 2026-07-09
> Web version: https://zeli.app/ko/story/48849983
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 3 · by [forthwall](<https://news.ycombinator.com/user?id=forthwall>) · 💬 1
[original](<https://shub.club/writings/2026/july/check-your-scrollheight/>) · [HN discussion](<https://news.ycombinator.com/item?id=48849983>)

## Summary

Letta Desktop의 성능 문제를 조사하던 저자는 원인이 자신의 코드가 아니라 scrollHeight 속성에 대한 잘못된 가정에 있음을 발견합니다. 새 메시지가 올 때마다 `el.scrollTop = el.scrollHeight`로 스크롤을 강제했는데, scrollHeight는 단순한 읽기 전용 값이 아니라 접근할 때마다 레이아웃을 강제로 계산하는 동적 속성이었습니다. Chromium의 구현 코드를 통해 이 사실을 확인하고, 해결책으로 정확한 값 대신 매우 큰 숫자를 사용하는 방법을 제안합니다.

## Key quote

> 속성은 동적일 수 있습니다. 특히 무언가 발생할 때 변경되는 속성은 그렇다는 게 당연해 보일 때 더욱 그렇습니다.

---

## Cite

- Page: https://zeli.app/ko/story/48849983
- Date: 2026-07-09
- Source: shub.club (https://shub.club/writings/2026/july/check-your-scrollheight/)
- Hacker News: https://news.ycombinator.com/item?id=48849983

## Other languages

- en: https://zeli.app/story/48849983 · markdown: https://zeli.app/story/48849983.md
- zh: https://zeli.app/zh/story/48849983 · markdown: https://zeli.app/zh/story/48849983.md
- ja: https://zeli.app/ja/story/48849983 · markdown: https://zeli.app/ja/story/48849983.md
- de: https://zeli.app/de/story/48849983 · markdown: https://zeli.app/de/story/48849983.md
- es: https://zeli.app/es/story/48849983 · markdown: https://zeli.app/es/story/48849983.md
