In case of slow response times in a user interface, indicate that the wait time will soon be over by showing an animation. For longer delays use a percent-done indicator.
User interfaces must be fast, or users will give up. (In the case of websites, they'll leave if pages download too slowly.) The exact maximum response times vary by usage circumstances, and should be either 0.1, 1.0, or 10 seconds.