25 ms·
This is like asking why clicking buttons or links in web apps often just does nothing. You don't notice because you "know" the browser is loading the next page,
by mike_hearn 5y ago
This is like asking why clicking buttons or links in web apps often just does nothing. You don't notice because you "know" the browser is loading the next page, you're waiting for the server and because you know that browsers don't bother displaying beachballs anymore even though the app is busy. But it's not actually any different.
If you like, structure your desktop app as two threads. One does the UI. The other does processing stuff. Exchange only messages back and forth. I've actually written a desktop app this way in the past. However it's not the silver bullet you might expect, largely because expectations users have for desktop apps are significantly higher than on a web app. In particular they expect something obvious to happen when they click buttons or menu items, and they definitely don't expect long delays simply because the backend is busy. So I ended up having to introduce some shared memory and read/write locks back again, as the pure message passing model was occasionally introducing UI stalls. In a web app you'd just ignore them because standards are low. On the desktop it's like on mobile, you have to care about the responsiveness a lot more.