The first of Nielsen's usability heuristics states that a system should always keep users informed about what's going on, through appropriate feedback within a reasonable time. But what is "appropriate feedback"? And what is a "reasonable time"?
Nielsen's advice is that the limit is about 0.1s for users to feel that they are directly manipulating the UI, 1s for their flow to remain uninterrupted, and 10s for keeping the user's attention.
Response times under 0.1s need no feedback to the user, other than displaying the result of their action.
Response times of between 0.1s and 1s typically require no special feedback, but the user will feel like the computer is working on their command. They will lose the feeling of being in direct control.
Response times of between 1s and 10s typically require an unobtrusive indicator that the system is busy, such as changing the cursor to a busy icon or providing a discreet numeric indication of percent done in the corner of the screen.
Response times of over 10s should display some kind of percent done indicator, should allow the user to perform other work while waiting, and should allow the user to cancel the task. A percent done indicator reassures the user that the system has not crashed, indicates how much longer he can expect to wait, and makes the wait less annoying by giving him something to look at. If a percent done indicator cannot be provided, the next best option is to display messages providing running feedback on what the system is currently doing. Displaying a non-specific busy indicator should be a last resort.