Spinning Pinwheel - Guidelines, Tools and Methods For Developers

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 Pinwheel

Famous quotes containing the words tools and/or methods:

    At the utmost, the active-minded young man should ask of his teacher only mastery of his tools. The young man himself, the subject of education, is a certain form of energy; the object to be gained is economy of his force; the training is partly the clearing away of obstacles, partly the direct application of effort. Once acquired, the tools and models may be thrown away.
    Henry Brooks Adams (1838–1918)

    Commerce is unexpectedly confident and serene, alert, adventurous, and unwearied. It is very natural in its methods withal, far more so than many fantastic enterprises and sentimental experiments, and hence its singular success.
    Henry David Thoreau (1817–1862)