Comment on Most UI Applications are Broken Real-time Applications

<- View Parent
lysdexic@programming.dev ⁨9⁩ ⁨months⁩ ago

Maybe I’m dumb because I’m a backend dev, but if we can’t offload these tasks to Async tasks and we need to block the main thread, why can’t we just put up a loading screen?

That’s not the problem. These tasks can be offloaded to async. The underlying issue, and the reason why I think this is an outstanding article, is that running code on the UI thread straight from handlers is easy and more often than not it goes perfectly unnoticed. Only when the execution time of those handlers grow do these blocking calls become an issue.

There’s a gray area between “obviously we need to make these calls async” and “obviously we can run this on the main thread”, and here’s where the real-time mental model and techniques pay off.

source
Sort:hotnewtop