The Ultimate Business Machine - Archives
List of Categories : Database * Technology * Commentary * Singapore * Travel *
Wed 18 Nov 2009
Death to the Spinning Rainbow Beach Ball
Category : Technology/MavenSnowAndDeathToRainbowBeachBall.txt
On the Mac, if your application doesn't respond to user events for more than 5 seconds (e.g., on Maven when it's searching through 15,000 records looking for just the one you want), the cursor changes to the Spinning Rainbow Beach Ball. To the user, the application looks like it's gone dead and you're tempted to force-quit it.
So I've always wanted to kill this Spinning Rainbow Beach Ball of Death. On the latest release of Maven Snow, I've been able to do just that.
Snow Leopard brings with it Grand Central Dispatch which makes it easier for a Cocoa programmer to take advantage of the multiple CPUs we have in modern-day Macs to do concurrent programming without getting down and dirty with threads.
But I've started off with a slightly older technique - Operation Queues, which will also work on the iPhone (one day, it'll have a multi-core). On Maven for Snow Leopard, you can have multiple windows open and trigger a search on each window without waiting for the previous one to finish. In a long search, you never get the spinning beach ball. The application remains responsive to user action and it feels more natural working with the app.
I've added this to the latest development build of Luca that I'm working on in Snow Leopard. I can do a Trial Balance, and while it's doing that, do a Statement of Accounts report simultaneously, and it doesn't tie up the GUI.
On my Snow Leopard iMac it works great and both reports finish not much longer than it took one report on the current Luca on Leopard. Of course, there you had to run each report sequentially, waiting for one to finish before starting the other. So the world looks good, going forward.