Application Responsiveness
Have you ever cursed at a GUI application? Have you ever found yourself waiting while your computer decides to do Other Things(TM) instead of responding to your frantic mouse clicks or keypresses? I sure have – and I’m afraid that I’m guilty of writing applications that can be unresponsive, myself. I found an article about this on DDJ that I found extremely interesting; I highly recommend that you read it if you work with GUIs. It’s nothing revolutionary, and the latter pages aren’t exactly my cup of tea, but the problem description along with the notes on Windows message handling made it worthwhile for me at least.
I’m a firm believer in Windows. Not because I think that it’s technically superior to Mac or Linux or Solaris or whatever; no, simply because the best applications are available for it, in my opinion. In case you’re a Linux fanatic: please, I don’t want to hear that there are technically and morally superior alternatives to the applications I use: ease-of-use is something I value, and so far Windows apps beat Linux ones hands down in that department. (I’m impressed by Mac, however, from the little I’ve seen. I’m sure I’ll get a Mac laptop sooner or later.)
But if there’s something that irritates me with Windows, it’s the fact that responsiveness can go down the drain when there’s, for example, a lot of I/O activity. As is described in the DDJ article, it seems to be extremely easy to make unresponsive Windows applications. All it takes is a programmer who decides that it’s unnecessary to separate a message handling/GUI thread from a processing one. Combine this with serial unprioritized processing of every message, and the recipy for user frustration is ready.
Now, there are a few different views one can have on this:
- Windows GUI and message handling is badly implemented, and allows stupid lockups. All of this should be handled with better message queues and a better system framework.
- Application programmers are lazy and/or incompetent; they don’t realize that they have to plan for all eventualities – this includes worst-case scenarios when it comes to responsiveness.
- Both of the above.
I’m the first to admit that programming for Windows can be a pain in the nether regions, but if I stand by my choice of OS and also make applications myself, I have no defence for my overly sloppy GUI programming so far!
