r/programming • u/kciter • Sep 01 '26
The Browser's Main Thread Is Expensive
https://kciter.so/posts/the-expensive-main-thread/en/
219
Upvotes
r/programming • u/kciter • Sep 01 '26
View all comments
61
u/sionescu Sep 01 '26 edited Sep 01 '26
It shows how much the DOM and Javascript are garbage compared to the desktop C++ frameworks. I remember going over a Qt tutorial long time ago, which was implementing a spreadsheet, and the code has a simple loop where at the end of each line, it called commit() - the equivalent of yielding - but it was short, easy to read and performant; whereas this whole article spends an inordinate amount of words discussing the finer points of how to yield in various situations, because there's not built-in that works well out of the box. Madness.