Responding to User Requests
If your application takes too long to respond, users will become frustrated. Use these techniques to improve the responsiveness of your application.
-
Display feedback as soon as possible.
-
If you cannot display all the information that a user has requested, display the most important information first.
-
Save time by displaying approximate results while calculating finished results.
-
If users are likely to repeat a time-consuming command in rapid succession, save time by faking the command's effects instead of repeatedly processing the command. For example, if a user adds several rows to a table stored in a database, you might display each new row immediately but delay actually creating each new row in the database until the user finished adding all the rows.
-
Work ahead. Prepare to perform the command that is most likely to follow the current command. That is, use idle time to anticipate users' probable next requests. For example, as the user of an email application reads the currently displayed new message, the application might prepare to display the next new message.
-
Use background processing. Perform less important tasks —such as housekeeping— in the background, enabling users to continue working.
-
Delay work that is not urgent. Perform it later, when more time is available.
-
Discard unnecessary operations. For example, to move back several pages in a web browser, a user might click the browser's
button several times in rapid succession. To display the final requested page more quickly, the browser might not display the pages visited between the current page and that final page. -
Use dynamic time management. At run time, change how your application prioritizes user input and other processing, based on the application's current state. For example, if a user is typing text in one word-processing document while printing another, the word-processing application might delay the printing task if the user shifts to an editing task (such as cutting and pasting text) that requires greater resources.
-
In your application, display an estimate of how long each lengthy operation will take.
- If a command might take longer than 5 seconds to complete its work on an object, allow users to interact with any parts of the object and parts of the application that are not directly affected by the command.
- If a command provides lengthy output, show partial results as they become available. Scroll the results (if necessary) until the user moves input focus to a component (e.g. a scrollbar or text area) involved in the scrolling.