I have a task to generate a file based on the data from several records (sources) that could be selected on UI. A user can select from 1 to 100 records. The generation (request processing) time depends on the number of selected records. It can be from several milliseconds to approximately 5 seconds.
I am planning to display the spinner component for this request. But as I mentioned above it might be processed too fast and the spinner will blink. So, is it ok from the UX standpoint to set some minimum displaying time for the spinner to prevent irritating blinks? If yes, then what is the best timeout? 1 second?
P.S. I have read a great Progress Indicators Make a Slow System Less Insufferable article on the Nielsen Norman Group website. But it does not fully answer my question.
Neilson's research would suggest that your guess of 1 second is in the right area - or more specifically, that the time needed is somewhere between 0.1 second and 1 second. I'd probably try 0.5 seconds and see how that feels for the users.
Note that as you can approximately tell in advance what the time will be, you know immediately weather or not to turn on your spinner. So, if the user has less than 10 selected when they press the button (based on the numbers given above, assuming a linear relationship, 10 would be about 0.5 seconds) DON'T display the spinner, but otherwise, IMMEDIATELY display the spinner. This is based on the principle that if the program knows something UX related in advance, that should be immediately shown to the user (the same principle that says you should simply not allow options that are impossible to be selected - i.e. disable them - rather than letting the user choose them and then saying "sorry, can't do that").