TLDR Dev · ARTICLES & TUTORIALS

ARE YOU TELLING ME A READONLY PROPERTY IS WRECKING MY PERFORMANCE?

shub.club2 min read

Summary from the TLDR Dev newsletter

A performance issue in an application was identified as being caused by incorrect assumptions about how a readonly property, `scrollHeight`, operates. The realization came when it was discovered that setting this property for every new message led to major slowdowns due to continuous recalculations. To resolve the issue, a simpler approach was implemented by using a large number instead of calculating the precise `scrollHeight`.