Comment by seanwilson
7 years ago
More than a few times, I've had an app where an "in progress" dialog would pop-up and disappear for an operation that could take anywhere from 0.1 seconds to a few seconds to complete. If it happens to complete quickly, you don't get to see the dialog text and it can be confusing if the operation succeeded or not. A solution is to force the dialog to be shown for a minimum of a couple of seconds. It's a weird trade-off between wasting the time of a user who understands what's going on and avoiding confusion for a user who doesn't understand the app so well.
Or you can delay showing the dialog for half a second, during which you gather progress data and estimate for how long the dialog would be shown. If it's less than a couple of seconds, don't show it at all.
Yep, that's another way. You still need to give some kind of feedback though if the dialog isn't shown otherwise it'll get perceived as lag. Also, say you wait 0.5 seconds until the dialog has to be shown but the operation takes 0.51 seconds: once the dialog appears you should still probably have it displayed for a minimum amount of time otherwise it looks like a glitch.
After 0.5 seconds you should have a good enough estimate to know that the operation will take 0.51 seconds, in which case you don't show the dialog at all. Of course estimations are sometimes wrong, but it shouldn't be a problem if you flash a dialog for 0.01 seconds once in a thousand times.