Re: Best practice with NSProgressIndicator

2017-07-28 Thread Alex Zavatone
Use MBProgressHUD. It has much better options for deterministic and indeterminate progress indicators. I have been using it since 2011 or 2012. There are several factors that many people are unaware of in that if the operation completes in under .75 seconds, you do not want to display the

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Quincey Morris
On Jul 28, 2017, at 14:16 , Mark Allan wrote: > > Reducing the frequency of NSXPC messages was a secondary goal to figuring out > how often the main app ought to be updating the UI. I’d be interested in knowing why you didn’t say that the other way round. Surely reducing

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Mark Allan
Many thanks for all the responses. In terms of what I'm doing, the NSTimer with 0.1 second granularity sounds like the best fit. > On 28 Jul 2017, at 7:26 pm, Charles Srstka wrote: > > If you’re using Swift Still on Objective-C. Thanks though, I'll keep that

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Charles Srstka
If you’re using Swift, I made a custom replacement for NSProgress that is specifically designed to cut down on CPU time used to update the progress. It allows you to set the granularity for notifications, so that they’ll only update when the progress has changed since the last update by an

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Quincey Morris
On Jul 28, 2017, at 08:57 , Mark Allan wrote: > > 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

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Alastair Houghton
On 28 Jul 2017, at 16:57, Mark Allan wrote: > > I'm wondering if anyone has any thoughts about or links to best practices > when using determinate NSProgressIndicators. [snip] > I'm debating doing it with an NSTimer firing every second, but wondered if > anyone had any

Re: Best practice with NSProgressIndicator

2017-07-28 Thread Andreas Mayer
> Am 28.07.2017 um 17:57 schrieb Mark Allan : > > 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. Just keep track of the time of the last update and do it

Best practice with NSProgressIndicator

2017-07-28 Thread Mark Allan
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