Posted on July 9, 2026 • 16534 views I was deep into investigating a performance issue with Letta Desktop lately; the story was same old same old, the greater the use, the slower the product. This seemed pretty obvious to me probably just some long running for loop, or unoptimized code. What came to my realization was that actually the issue has nothing to do with my code (well, it did still, but, it was based on a bad assumption). The issue had to do with how I was forcing the UI to scroll down on new messages. You see, I was using a simple script: el . scrollTop = el . scrollHeight ; Seems reasonable, seems performant right. If you look at the specification of scrollHeight, it seems like this property is static, and only updated on paint itself, not when accessing it. I was wrong, of course, this is not performant, why would we set a property every time an element is modified, it makes more sense to calculate it when the user requests it.…