Hi all,

I'm wondering if anyone has any thoughts about or links to best practices when 
using determinate NSProgressIndicators.

I have an app with a helper tool that performs some lengthy process in a loop 
and reports progress to the user.  It works out how many iterations of the loop 
will be needed, sets the progressbar.maxValue, and then increments the progress 
bar's value on each iteration.

The consumes a large amount of CPU time just for updating the progress bar, so 
I'd like to cut down how often I update it.

Setting the max value to 100 and only updating 100 times (i.e. as a percentage) 
seems too infrequent because the loop can iterate more than a million times.

I'm debating doing it with an NSTimer firing every second, but wondered if 
anyone had any other suggestions?

What are people's thoughts?

I've tried searching online and the only problems/solutions I can see are all 
related to people's progress bars not updating properly because they're 
blocking the main thread etc. I can't see anything related to best practice.

Many thanks
Mark

PS. It could be that this is a case of premature optimisation...but I don't 
think so!
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to