Re: Progress Indicators Spin vs Bar
Re: Progress Indicators Spin vs Bar
- Subject: Re: Progress Indicators Spin vs Bar
- From: Greg Parker <email@hidden>
- Date: Mon, 20 Jun 2011 14:05:11 -0700
On Jun 20, 2011, at 11:47 AM, James Merkel wrote:
> Another question -- when should a progress indicator be put up? The length of time in my processing loop can very greatly. I could be processing 3 files or 300 files. It seems a waste to flash a progress indicator for very short processing cases. On the other hand I can't just set a threshold for putting up a progress indicator, since the processing period can very from one machine to another. Also the processing period varies for different file types and even varies on the same machine from run to run. No obvious answers to some of these questions.
One solution is to simply start the operation with no displayed progress, then later show the progress if it has not finished in X seconds.
(Programmatically: schedule a one-shot NSTimer for X seconds later that starts showing progress when it fires. When the operation finishes, cancel the timer if it has not fired already. Do this both of these on the main thread to avoid thread-safety problems.)
Your app will feel faster if short operations appear to finish "instantly" instead of briefly flashing a progress bar. File operations in the Finder do something like this.
On the other hand, you should always show progress if the operation has no user-visible side effects. Nothing is worse than displaying nothing and leaving the user to wonder whether it did anything at all. In this case you want the finished progress bar to appear as a confirmation to the user for at least some minimum length of time.
> True it's extra code to conditionally display an indicator, so I may as well always display it.
> The bigger problem is putting the long process into another thread. Need to delve into that.
Yes, the work thread will be the hard part. Polishing the progress UI should be straightforward after that.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden