{"id":247,"date":"2006-06-10T22:45:50","date_gmt":"2006-06-10T11:45:50","guid":{"rendered":"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/06\/10\/more-thoughts-on-software-slowness\/"},"modified":"2006-06-10T22:45:50","modified_gmt":"2006-06-10T11:45:50","slug":"more-thoughts-on-software-slowness","status":"publish","type":"post","link":"https:\/\/www.somethinkodd.com\/oddthinking\/2006\/06\/10\/more-thoughts-on-software-slowness\/","title":{"rendered":"More Thoughts On Software Slowness"},"content":{"rendered":"<p>My <a href=\"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/06\/08\/reacting-to-the-unresponsive\/\">recent entry<\/a> condemning unresponsive applications took me a long time to write. I knew I was frustrated with unexpected software slowness, but I couldn&#8217;t put my finger on why.<\/p>\n<p>I realise now that I was <a href=\"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/02\/13\/conflated\/\">confounding<\/a> three separate problems.<\/p>\n<h4>Unresponsiveness<\/h4>\n<p>An application is unresponsive if, while working on a task, it fails to respond to background user or operating system requests. The two canonical examples are failing to repaint the screen or failing to abort upon request.<\/p>\n<p>I realised a couple of days ago this was the pet peeve that was causing most of my frustration.<\/p>\n<div class=\"aside\">From a broad technical standpoint, I think the lessons here are:  <\/p>\n<ul>\n<li>Don&#8217;t start long operations in the UI thread; push them off into a different thread. Developers should consider their priorities of fast-to-develop versus fast-to-respond, and remember that I am lobbying to generally raise the fast-to-respond priority.<\/li>\n<li>When you block a thread listening for an event, you should also be listening for an abort signal.<\/li>\n<li>If you are doing highly CPU-intensive work, ensure that the OS can abort the thread easily you, or you need to sprinkle in some tests for an abort signal inside the big loops. Yes, this might have some performance impact. The developers should carefully consider their priorities of fast-to-finish versus fast-to-respond. Again, I am lobbying to raise the priority of fast-to-respond.<\/li>\n<\/ul>\n<\/div>\n<h4>Unexpected CPU Hogs<\/h4>\n<p>Another frustration that I was confounding was software which unexpectedly consumes a lot of CPU &#8211; the applications you stare at while scratching our head and wondering what they could possibly be doing that needs all that much CPU.<\/p>\n<div class=\"aside\">Google Desktop Crawl, I am looking at you! You too, Mobile Master. What <em>are<\/em> you guys thinking about? Shouldn&#8217;t you be disk or network bound, not CPU bound?<\/div>\n<p>Applications that do <a href=\"http:\/\/en.wikipedia.org\/wiki\/Busy_waiting\" title=\"Wikipedia definition of Busy_waiting\" class=\"wikipedia\">busy waits<\/a> should be punished punitively, while buggy applications that get into an infinite loop deserve more of our compassion and help at rehabilitating.<\/p>\n<h4>Outstaying their Welcome<\/h4>\n<p>My bus is leaving. The meeting is starting. There&#8217;s a fire alarm. I am off to get a drink while my machine restarts. Whatever my reasons for shutting down, I expect that my applications shut down quickly and without protest. Don&#8217;t make me reach for that  power button!<\/p>\n<p>The number three frustration is applications that come up with lousy excuses for not quitting when they are told. <\/p>\n<div class=\"aside\">I am not naming my most hated culprit for reasons of self-censorship. The application pops up on shut-down to ask whether you want it to clean out its internal recycle bin. Yes or No &#8211; either answer would be a much better default than stopping my machine shut-down cycle to ask the question.<\/div>\n<p>Perhaps there needs to be some OS support in this area, so programs can save their intermediate data into a known temporary store so they don&#8217;t need to ask me &#8220;Do you want to save?&#8221;  Just re-open the half-finished documents on reboot and let&#8217;s get on with it.<\/p>\n<h4>Summary<\/h4>\n<p>So there are at least three different frustrating issues that mean that my super-fast machines don&#8217;t act super-fast. Developers need to start thinking more about the impact these issues have on their users before the revolution comes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My <a href=\"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/06\/08\/reacting-to-the-unresponsive\/\">recent entry<\/a> condemning unresponsive applications took me a long time to write. I knew I was frustrated with unexpected software slowness, but I couldn&#8217;t put my finger on why.<\/p>\n<p>I realise now that I was <a href=\"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/02\/13\/conflated\/\">confounding<\/a> three separate problems: Unresponsiveness, Unexpected CPU Hogs and Outstaying Their Welcome.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[29,25,34],"tags":[],"class_list":["post-247","post","type-post","status-publish","format-standard","hentry","category-influencing-others","category-insufficiently-advanced-technology","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":0,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/247\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/media?parent=247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/categories?post=247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/tags?post=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}