Re: NSOperation Efficiency

2012-12-05 Thread Quincey Morris
On Dec 4, 2012, at 23:02 , "Gerriet M. Denkmann" wrote: > And got almost the same overhead (tested three times with 99 operations); > clock time per operationexpected time overhead factor > //8 ops 29.9, 30.1, 29.712.52.4 > //7 ops 2

Re: Operations Beachball

2012-12-05 Thread Joar Wingfors
What happens if you remove the "isCancelled" checks? How do you create your operation queue? What is the max concurrent operation count of the queue? If NSOperationQueueDefaultMaxConcurrentOperationCount, what happens if you set it to (processorCount) instead? When you take a CPU sample of the pr

Re: NSOperation Efficiency

2012-12-05 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 15:07, Quincey Morris wrote: > On Dec 4, 2012, at 23:02 , "Gerriet M. Denkmann" wrote: > >> And got almost the same overhead (tested three times with 99 operations); >> clock time per operationexpected time overhead factor >> // 8 ops 29.9, 30.1, 29.7

Re: Operations Beachball

2012-12-05 Thread Gerriet M. Denkmann
On 5 Dec 2012, at 15:57, Joar Wingfors wrote: > What happens if you remove the "isCancelled" checks? No effect on blocking. > How do you create your operation queue? if ( self.operationQueue == nil ) { self.operationQueue = [ [ NSOperati

Re: NSOperation Efficiency

2012-12-05 Thread Quincey Morris
On Dec 5, 2012, at 01:09 , "Gerriet M. Denkmann" wrote: > When I press a button "Start" this gets done: > > self.start = [ NSDate date ]; > for( NSUInteger i = 0; i < self.nbrWork; i++ ) > { > GmdOperationBasis *m2 = [ [ GmdOperationBasis alloc ] init ]; >

Re: NSOperation Efficiency

2012-12-05 Thread Mike Abdullah
On 5 Dec 2012, at 04:41, Kyle Sluder wrote: > NSOperationQueue uses KVO for dependency tracking and queue width > management. In 10.7, the implementation was apparently changed to thunk > all KVO ops onto the main thread; I'm guessing this fixed a bug by > serializing all state changes. It also

Re: Operations Beachball

2012-12-05 Thread James Montgomerie
On 4 Dec 2012, at 18:29, Jens Alfke wrote: > On Dec 4, 2012, at 3:48 AM, Gerriet M. Denkmann wrote: > >> My app creates lots of MyOperations (subclass of NSOperation) and puts them >> into an NSOperationQueue. >> I would expect that the app thus remains responsive, but sometimes it is not. >

Re: NSOperation Efficiency

2012-12-05 Thread Kyle Sluder
On Tue, Dec 4, 2012, at 08:00 PM, Jens Alfke wrote: > Apologies, but I have trouble believing that. Isn’t NSOperationQueue just > a thin veneer around GCD? By the way, it's worth pointing out that NSOperationQueue is NOT a thin veneer around GCD. Blocks submitted to an NSOperationQueue are dispat

Re: NSOperation Efficiency

2012-12-05 Thread Kyle Sluder
On Dec 5, 2012, at 2:05 AM, Mike Abdullah wrote: > > On 5 Dec 2012, at 04:41, Kyle Sluder wrote: > >> NSOperationQueue uses KVO for dependency tracking and queue width >> management. In 10.7, the implementation was apparently changed to thunk >> all KVO ops onto the main thread; I'm guessing t

Cocoaheads Lake Forest meets tonight

2012-12-05 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, December 5. Stuart Cracraft will be discussing "Mass

Re: Cocoaheads Lake Forest meets tonight

2012-12-05 Thread Scott Ellsworth
Cancel that. A moment after hitting send, I noted that Dec 5 is NOT the second wednesday of the month. No meeting tonight. Meeting next week. Sorry about the noise. Scott On Wed, Dec 5, 2012 at 9:04 AM, Scott Ellsworth < scott_ellswo...@alumni.hmc.edu> wrote: > CocoaHeads Lake Forest will b

Re: Operations Beachball

2012-12-05 Thread Jens Alfke
On Dec 4, 2012, at 11:46 PM, Gerriet M. Denkmann wrote: > When I add 8 or more operations to NSOperationQueue (using > NSOperationQueueDefaultMaxConcurrentOperationCount concurrent ops) , > - then switch to some other app, > - then try to make my app active again, I get a beach-ball. > My app

Re: Object not being drawn in Cmd + N. Why? SOLVED

2012-12-05 Thread Peter Teeson
On Oct 25th 2012 I posted about this. I finally got around to digging into what the cause was and have now got my app working correctly (or at least the way I want it to). In summary it was all related to saving and restoring the graphic context correctly in -drawRect. In my case I use a number

Cascading windows

2012-12-05 Thread Peter Teeson
Xcode 4.5.2, Lion 10.7.5 My app is a Document app and I implemented -(void)makeWindowControllers. It could have several documents open at the same time. In particular I want to cascade the window when a New document is opened. I've read up on this and am aware of the NSWindow method - (NSPoint

Re: NSOperation Efficiency

2012-12-05 Thread Graham Cox
On 05/12/2012, at 8:09 PM, Gerriet M. Denkmann wrote: > for( NSUInteger i = 0; i < self.nbrWork; i++ ) > { > GmdOperationBasis *m2 = [ [ GmdOperationBasis alloc ] init ]; > [ self.operationQueue addOperation: m2 ]; > }; This is also leaking, could that

Re: Object not being drawn in Cmd + N. Why? SOLVED

2012-12-05 Thread Graham Cox
On 06/12/2012, at 5:59 AM, Peter Teeson wrote: > In my case I use a number of gradients as well a bezier paths and the crucial > thing was to understand just where and when to save/restore the context. Well, knowing this is usually a case of common sense. In the vast majority of drawing, you

Re: Arc and **

2012-12-05 Thread John McCall
On Dec 4, 2012, at 10:44 PM, Gerriet M. Denkmann wrote: > On 5 Dec 2012, at 12:59, Greg Parker wrote: >> On Dec 4, 2012, at 8:56 PM, Gerriet M. Denkmann wrote: >>> I have (using Arc) a method which works fine: >>> NSString *explanation; >>> [ self doSomeThingAndExplain: &explanation ]; >>> >>>

Re: Cascading windows

2012-12-05 Thread Mike Abdullah
The document architecture already provides proper cascading behaviour. What are you seeing that makes you think you need to implement it yourself instead? On 5 Dec 2012, at 20:55, Peter Teeson wrote: > Xcode 4.5.2, Lion 10.7.5 > > My app is a Document app and I implemented -(void)makeWindowCon

Re: How to capture a video stream

2012-12-05 Thread gary . gardner
> On Dec 4, 2012, at 16:50 , gary.gard...@brokensoftware.com wrote: > >> The setSampleBufferDelegate:self queue:queue gives a warning in XCode >> that >> says Sending '' to parameter of incompatible type >> 'id'' > > You need to declare the class of 'self' as conforming to the > AVCaptureVideoDataO

Re: How to capture a video stream

2012-12-05 Thread Quincey Morris
On Dec 5, 2012, at 19:53 , gary.gard...@brokensoftware.com wrote: > Do I need to use CoreMedia to actually get an image from the sampleBuffer? > Using Xcode, it appears that UIImage is for iOS (this is just a > supposition). So XCode changes the code to CIImage. > > If this is the wrong directio