Guidelines, Tools and Methods For Developers
Apple's guidelines suggest that developers try to avoid the spinning wait cursor, and suggest other user interface indicators, such as an asynchronous progress indicator.
Possible causes include:
- By default, events (and any actions they initiate) are processed sequentially. This design works well when each event leads to only a trivial amount of processing, which causes the application to appear responsive. However, if the processing takes too long, the spinning wait cursor will appear until the operation is complete. Developers may prevent this happening by performing processing on a separate thread, allowing the application's main thread to continue responding to events. However, this greatly increases the application complexity.
- Bugs in applications can cause them to stop responding to events; for instance, an infinite loop or a deadlock. Applications that do this rarely recover.
- Problems with the virtual memory system such as slow paging caused by a spun-down hard disk (or, potentially, read errors) will cause the wait cursor to appear. In this case, multiple applications will display the wait cursor as they attempt to access memory that must be paged in until the hard disk and virtual memory system recover.
Spin Control is an application that comes with the Mac OS X Developer Tools. It allows the user to monitor and sample applications that are either not responding or performing a lengthy operation. Each time an application does not respond and the spinning wait cursor is activated, Spin Control will sample the application to determine which code is causing the application to stop responding. With this information, the developer can rewrite code to avoid the cursor being activated.
Read more about this topic: Spinning Wait Cursor
Famous quotes containing the words tools and/or methods:
“But lo! men have become the tools of their tools.”
—Henry David Thoreau (18171862)
“The reading public is intellectually adolescent at best, and it is obvious that what is called significant literature will only be sold to this public by exactly the same methods as are used to sell it toothpaste, cathartics and automobiles.”
—Raymond Chandler (18881959)