Re: Repository of older (outdated) PDF Guides?
I’ve got a collection here: https://www.dropbox.com/sh/dlhxh9birw1lhp9/AABA3_yvSRwjOBA84LxD3RzIa?dl=0 Ranging from 2010-2014. Kevin > On May 11, 2017, at 00:32, Nimesh Neemawrote: > > I have a few lying around here: > > https://www.dropbox.com/sh/h0h56lj0dky27m9/AADbwmnbhu8I6DRVldV8Lum0a?dl=0 > > See if you find anything of use. > > Nimesh > > On 25 April 2017 at 23:50, David Hoerl wrote: > >> I've googled til my fingers are black and blue, but no luck finding some >> of the older PDF guide documents. I could never express in words how >> disappointed I am that Apple discontinued producing readable documentation >> - I use to crow about it to all my non-Apple dev friends. >> >> Anyway, does anyone know of a place that stashed copies away? I'm fine >> with reading 5 year old documentation to get the big picture, then make >> annotations on paper copies, finally go online to see if anything of >> interest changed. >> >> Thanks for any pointers! >> >> David >> >> PS: https://forums.developer.apple.com/message/100458 >> >> Note - I have some myself, but didn't keep them up to date so some way old >> (never thought they'd go away). Need one? Email me and I'll send if have it. >> ___ >> >> 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/nimeshneema%40gmail.com >> >> This email sent to nimeshne...@gmail.com >> > ___ > > 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/apple%40kevin.com > > This email sent to ap...@kevin.com ___ 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
Re: ObjC question
On Apr 10, 2010, at 2:38 PM, Tony Romano wrote: Using the sample below, how do I get the instance of the class in which I am contained WITHOUT passing it as a parameter or using hacky sizeof tricks in the method Foo:method? Thanks people! If this is not the correct alias for this type of question, apologizes in advance. You do need to pass it as a parameter. If you look at how Interface Builder connects with code, actions called by, for example, buttons include a 'sender' parameter: - (void) myAction:(id)sender; This is done all over the place... You call the method: [f method:self]; and you're done. I'm not clear on why you don't want to pass it as a parameter. If that's really a firm restriction you'll need to explain why in order for anyone to answer the question adequately. BTW, when you say (in a later message) that an instance of f is contained in one instance of Bar, that's not a language restriction. It's just how you designed it. If it's an explicit part of the design it's OK to write code that knows about that... try this. I've left out anything related to reference counting, but I think it's basically right: @interface Foo : NSObject { id containerClass: } - (id) initWithContainer:(id)container; @end @implementation Foo - (id) initWithContainer:(id)container { self = [super init]; if(self) containerClass = container; return self; } @end @interface Bar : NSObject { Foo* f; } @end @implementation Bar @implementation Bar - (id) init { f = [[Foo alloc] initWithContainer:self]; } @end Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Moving from nib to code with custom controller.
On Mar 31, 2010, at 8:01 AM, James Cicenia wrote: Hello - I have always used IB before. I added my controller and linked it all up and it worked great. Now, I have to move this instead to code. I am confused on how to do this. 1) I have a custom view controller. (FeaturedViewController) 2) I have a UIScrollView (FeaturedScrollView) 3) I normally linked it up with IB scrollView = FeaturedViewController delegate = FeaturedViewController view = FeaturedViewController. SO.. How do I set this up in my init of my master Controller (HomePageController) Take a look at the ViewController sample, from Apple's web site. It sounds like you're asking for exactly what it's demoing. http://developer.apple.com/mac/library/samplecode/ViewController/ Kevin Thank you very much James ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/apple%40kevin.com This email sent to ap...@kevin.com ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Layout timing (was Re: setStringValue problems with dynamically loaded views.)
On Mar 17, 2010, at 3:20 PM, Kevin Brock wrote: On Mar 17, 2010, at 2:42 PM, Kyle Sluder wrote: which is designed for just this kind of scenario. NSViewController doesn't have an analog for -windowDidLoad; instead you are expected to override -loadView, call super's implementation, and then perform your setup. That is the approach I would recommend. Thanks. This fixed my problems! Well, this fixed *some* problems. Since I'm doing dynamic layout of the controls in the window I don't know what's going to be there until runtime. The problem I'm seeing is odd, because although layout *is* being done, it's being done inaccurately. By that I mean that the frames I'm setting aren't the frames that are getting set. All of the views have wantsLayer set, and none of them are set to automatically resize subviews. I'm doing the layout like this, where layoutFields: also does all of its layout using the animator: [NSAnimationContext beginGrouping]; [dynamicView layoutFields]; [[window animator] setFrame:window_frame display:YES]; [[dynamicView animator] setFrame:view_rect]; [NSAnimationContext endGrouping]; [auth_contents layoutFields]; The required height of the window is calculated from the controls, and here's an example of the values that are getting set: -- -[mydlg initWithTemplate:andDelegate:] XIB loaded. -- -[mydlg initWithTemplate:andDelegate:] -- -[mydlg windowDidLoad] -- -[dynamicView initWithTemplate:andDelegate:] XIB loaded. -- -[dynamicView loadView] -- -[dynamicView loadView] -- -[dynamicView initWithTemplate:andDelegate:] Initialized dynamic view. Window rect: X = 22, Y = 442, W = 340, H = 292 Dyn View rect: X = 20, Y = 20, W = 300, H = 230 -- -[dynamicView layoutFields] Field 2 rect: X = 0, Y = 0, W = 84, H = 22 Field 1 rect: X = 0, Y = 44, W = 225, H = 22 Label 1 rect: X = 0, Y = 70, W = 225, H = 17 Field 0 rect: X = 0, Y = 95, W = 225, H = 22 Label 0 rect: X = 0, Y = 121, W = 225, H = 17 -- -[dynamicView layoutFields] Window rect (after): X = 22, Y = 526, W = 340, H = 208 Dyn View rect (after): X = 20, Y = 20, W = 300, H = 146 -- -[mydlg windowDidLoad] But the values aren't getting set correctly. For example the view might get a Y position of -3, or 0, field 0 might be at 87 instead of 95, and everything else might be fine. The confusing part is that the layout *is* getting done, and its *almost* right. I'd understand it if it wasn't getting done at all, but why the inaccuracies? All of the numbers are floats, they're just shown here as ints. Any thoughts on this? Maybe I should be doing the layout later in the load process, but I thought that once the view was loaded that would be enough to layout the visible pieces... Order of the calls to setFrame: doesn't affect anything. Any pointers would be appreciated. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
setStringValue problems with dynamically loaded views.
I have some framework code which dynamically loads some views from it's bundle, based on parameters that are known at runtime. Calls to setStringValue appear to be having no effect for any of my NSTextFields, either labels or editable. Here's code that loads a custom view containing a text field from the framework bundle and then sets the text. @interface MyTextController : NSViewController { IBOutlet NSTextField* textField; } @end In the implementation: - (id)initWithText:(NSString*)field_contents { NSBundle* mybundle = [NSBundle bundleWithPath:@/Library/Frameworks/MyFramework.framework]; self = [self initWithNibName:@MyEditText bundle:mybundle]; if(self) { [textField setStringValue:field_contents]; } return self; } The view is loaded successfully, and the text field shows up where it's supposed to in the top level window. But the text isn't set. The .xib file shows that File's Owner is the correct subclass of NSViewController, and that the NSTextField control is connected to the textField outlet. Any ideas? Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: setStringValue problems with dynamically loaded views.
On Mar 17, 2010, at 2:42 PM, Kyle Sluder wrote: -initWithNibName:bundle: doesn't actually load the nib, so at this point textField hasn't been hooked up to anything yet. If you set a breakpoint on this line you'll find that textField == nil. You will need to move this logic elsewhere. The documentation for NSViewController (perhaps the release notes?) makes oblique reference to NSWindowController's -windowDidLoad method, which is designed for just this kind of scenario. NSViewController doesn't have an analog for -windowDidLoad; instead you are expected to override -loadView, call super's implementation, and then perform your setup. That is the approach I would recommend. Thanks. This fixed my problems! Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Dialog boxes with dynamic contents
I'm looking for some pointers to information on creating dialog boxes with content (# and type of controls) determined at runtime. All that I really know ahead of time is that there will be a dialog box to gather some data, and that the UI objects in the dialog come from a small, well defined set of types of objects. I don't know what order they're going to be in, or how many there will be (small number, almost always), either in aggregate or or each type. I'm pretty sure that I could just do it programmatically, creating and laying things out on the fly, but I'm hoping there's a simpler way. Most of the application is standard windows in a nib file. What I'm wondering is whether there are tools that would help with this... Although I've done some basic GUI work on OS X I know that there are plenty of things in the toolkit that I'm not aware of. Anyone know of anything that would make this simpler? Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dialog boxes with dynamic contents
Kyle Sluder wrote: On Mon, Nov 9, 2009 at 9:10 AM, Kevin Brock ap...@kevin.com wrote: I'm pretty sure that I could just do it programmatically, creating and laying things out on the fly, but I'm hoping there's a simpler way. Most of the application is standard windows in a nib file. You could take the NSPredicateEditor approach and create different views for each kind of thing that will be displayed in the dialog. Then it's just a matter of unfreezing these views from their nibs and arranging them at runtime, rather than arranging every single control. I don't know the higher level arrangements in advance either... It really is down to the per-control level. If you need finer-grained control than even that, you could do the loading using a subclass of NSViewController and put your view-rearrangement logic in that object, which would be the nib's file's owner. I'll take a look at that. Thanks. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Changes in KVO behavior on SL?
On Sep 1, 2009, at 6:11 PM, Ken Thomases wrote: On Sep 1, 2009, at 7:14 PM, Kevin Brock wrote: We've got an app that is using keyValueForPath: and observeValueForKeyPath:ofObject:change:context: to keep a status window up-to-date. On 10.5 it works fine. On 10.6 keyValueForPath: is called exactly once per property. When we later create a change dictionary and send observeValueForKeyPath:ofObject:change:context: to the observer for a property, valueForKeyPath: isn't called again. Huh? You have never been supposed to call - observeValueForKeyPath:ofObject:change:context: yourself, nor construct change dictionaries. When a property changes in a way that KVO can't automatically track, you are supposed to call -will/ didChangeValueForKey: (or the corresponding will/didChange... methods for set or array mutation) and KVO will generate the change notification itself. Good to know. I'll give that a try. Lot of legacy code in that part of the app--I doubt that this is the last thing I'll run into. Likewise, there's never been any guarantee that invoking - observeValueForKeyPath:ofObject:change:context: will provoke the receiver to call -valueForKeyPath: on the object whose property has changed. If the observer wants, it can rely totally on the information in the change dictionary. If you were using will/ didChange..., then KVO can be expected to invoke valueForKey: on the object whose property is changing, but that's not what (you say) you're doing. Thanks. That was helpful. On 10.5 the receiver *does* apparently always call valueForKeyPath, at least with the receivers we're talking to. Maybe they weren't checking the dictionary on 10.5, or were calling the fn if the data on the new values wasn't found in the dictionary, but are being stricter on 10.6. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Changes in KVO behavior on SL?
We've got an app that is using keyValueForPath: and observeValueForKeyPath:ofObject:change:context: to keep a status window up-to-date. On 10.5 it works fine. On 10.6 keyValueForPath: is called exactly once per property. When we later create a change dictionary and send observeValueForKeyPath:ofObject:change:context: to the observer for a property, valueForKeyPath: isn't called again. Is there a known change in 10.6 to how these functions are supposed to work? It's really odd, because all of our low-level code, including some KEXTs, works fine in 32 bit SL, but this one piece doesn't... Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSConnection Proxy Crash
Mr. Gecko wrote: [MGMDaemon setProtocolForProxy:@protocol(MGMDaemonProtocol)]; [MGMDaemon runTest:@Test]; The basic code looks OK. I've got code a lot like that which is working fine... What's the declaration of the protocol methods that you're calling? The low bytes of this: Exception Codes: KERN_INVALID_ADDRESS at 0xc023 look suspiciously like a Windows error code, 0xc23, STATUS_BUFFER_TOO_SMALL... Is there anywhere that you're getting back that type of error code on the other end of this? Kevin Crashed Thread: 0 Thread 0 Crashed: 0 libobjc.A.dylib 0x94738688 objc_msgSend + 24 1 com.apple.Foundation 0x95b9ac1a -[NSConnection handlePortCoder:] + 1178 2 com.apple.Foundation 0x95b9a72e -[NSConcretePortCoder dispatch] + 142 3 com.apple.Foundation 0x95b99e93 __NSFireMachPort + 339 4 com.apple.CoreFoundation 0x94f331c5 __CFMachPortPerform + 117 5 com.apple.CoreFoundation 0x94f57888 CFRunLoopRunSpecific + 3896 6 com.apple.CoreFoundation 0x94f57c78 CFRunLoopRunInMode + 88 7 com.apple.Foundation 0x95b943e5 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213 8 com.apple.Foundation 0x95ba0504 -[NSRunLoop(NSRunLoop) run] + 84 9 itunesmenudaemon 0x22e7 main + 320 (daemon.m:61) 10 itunesmenudaemon 0x2056 start + 54 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00104370 ebx: 0x95b5b2bb ecx: 0x947d4334 edx: 0xc003 edi: 0x0004 esi: 0x95d46874 ebp: 0xb508 esp: 0xb398 ss: 0x001f efl: 0x00010202 eip: 0x94738688 cs: 0x0017 ds: 0x001f es: 0x001f fs: 0x gs: 0x0037 cr2: 0xc023 I can't seem to find the problem, the command gets executed and then it crashes. Help please? Mr. Gecko ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/apple%40kevin.com This email sent to ap...@kevin.com ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSConnection Proxy Crash
Kevin Brock wrote: The low bytes of this: Exception Codes: KERN_INVALID_ADDRESS at 0xc023 look suspiciously like a Windows error code, 0xc23, STATUS_BUFFER_TOO_SMALL... I meant 0xc023 of course. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSConnection Proxy Crash
Greg Parker wrote: On Jul 10, 2009, at 12:18 PM, Kevin Brock wrote: look suspiciously like a Windows error code, 0xc23, STATUS_BUFFER_TOO_SMALL... Is there anywhere that you're getting back that type of error code on the other end of this? No, it looks like a malloc free list pointer. The base address was 0xc003 (in edx), which is NULL with the top two and bottom two bits all inverted. malloc masks its free list pointers that way on Leopard, and stores a free list pointer at the beginning of every freed block. So this pointer came from some code reading from a freed block. In objc_msgSend(), usually the receiver object has already been freed, and the malloc pointer was stored in place of the isa pointer. Coincidental resemblance... Just jumping at shadows :-) So you crashed in objc_msgSend: http://sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html Nice page. Very clear. Thanks for the link. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSConnection recursion -- (was Re: Long term performance of NSConnection)
Kirk Kerekes wrote: Use Activity Monitor (or other tool of your choice) to check for a port leak. It wasn't that... Turns out that the protocol on the connection had a call which took an Objective C object as a parameter. The parameter wasn't declared as /byref/ or /bycopy/, so I believe it defaulted to /byref/. In the remote function, that object was being sent a message, which appeared to call back into the original process. There was only one part of the object that was being used, an integer, so I changed the API to pass the integer value instead of the object, and the performance problems went away. Possibly declaring it as /bycopy/ would have done the same thing, but there was no point in copying the entire object when we only needed one piece of it. It's not completely clear why the performance hit was cumulative. I suspect that the call back to the original process was creating connections on the fly and not cleaning them up. If that's the case I think it's a bug in the NSDistantObject code. Kevin ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Long term performance of NSConnection
Aurélien Hugelé wrote: Are you sure you are not instantiating/creating/opening a connection each time? are you really reusing the same connection? Yes. There's a lot of logging around that code. If it was being closed and re-opened we'd see it. I've also debugged through that code, and the initialization routines are only called once. In the event of closing and re-opening the connection each time I'd expect to see a constant performance hit, not one that increased over time. Kevin Aurélien, Objective Decision Team On 2 juil. 09, at 21:29, Kevin Brock wrote: We've got an application that uses some NSConnection objects to call between binaries. An application calls interfaces of an object which is vended by a daemon. The calls between modules are made frequently, and during some testing I noticed a steady drop in perfomance of the application. I ran Shark, and saw that after a lot ( 1,000,000) calls across the API more than 95% of the time was being spent in 5 calls, all of which look like they're related to distributed objects: lookUpConnectionForProxy 30.5% lookUpLocalProxyForWireID 26.5% lookUpLocalObjectForProxy 22.8 lookUpOrCreateLocalProxyForObject 8.2% lookUpWireIDForProxy 7.6% I can't find any references to these functions on the net, and don't see anything in the docs that would explain this. We use a long term, persistent connection. The degradation starts very soon. Call Startup ~10,000 calls ~20,000 Calls lookUpConnectionForProxy 0.4% 4.2% 14.6% lookUpLocalProxyForWireID 0.8% 12.4% 15.7% lookUpLocalObjectForProxy 0.3% 2.8% 8.8% lookUpOrCreateLocalProxyForObject 0.5% 3.3% 4.8% lookUpWireIDForProxy 0.1% 0.7% 3.3% Is there something we are missing about the usage of the connection object? It looks like there's some table internal to the connection that's not being cleaned up. When I graph the actual perormance hit taken by the application (secs/1000 connections) it's essentially linear increase in time from 0 to 500,000 connections. When I run Shark on the daemon side for the 1,000,000 call case it shows three calls consuming 97% of the time Call Time lookUpConnectionForProxy 58% lookUpWireIDForProxy 28.9% lookUpOrCreateLocalProxyForObject 11.2% I'd really appreciate any suggestions about why this might be happening. Kevin Brock ap...@kevin.com ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/hugele.aurelien%40objective-decision.com This email sent to hugele.aurel...@objective-decision.com ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Long term performance of NSConnection
We've got an application that uses some NSConnection objects to call between binaries. An application calls interfaces of an object which is vended by a daemon. The calls between modules are made frequently, and during some testing I noticed a steady drop in perfomance of the application. I ran Shark, and saw that after a lot ( 1,000,000) calls across the API more than 95% of the time was being spent in 5 calls, all of which look like they're related to distributed objects: lookUpConnectionForProxy 30.5% lookUpLocalProxyForWireID 26.5% lookUpLocalObjectForProxy 22.8 lookUpOrCreateLocalProxyForObject 8.2% lookUpWireIDForProxy 7.6% I can't find any references to these functions on the net, and don't see anything in the docs that would explain this. We use a long term, persistent connection. The degradation starts very soon. Call Startup ~10,000 calls ~20,000 Calls lookUpConnectionForProxy0.4% 4.2% 14.6% lookUpLocalProxyForWireID 0.8% 12.4% 15.7% lookUpLocalObjectForProxy 0.3% 2.8% 8.8% lookUpOrCreateLocalProxyForObject 0.5% 3.3% 4.8% lookUpWireIDForProxy0.1% 0.7% 3.3% Is there something we are missing about the usage of the connection object? It looks like there's some table internal to the connection that's not being cleaned up. When I graph the actual perormance hit taken by the application (secs/1000 connections) it's essentially linear increase in time from 0 to 500,000 connections. When I run Shark on the daemon side for the 1,000,000 call case it shows three calls consuming 97% of the time Call Time lookUpConnectionForProxy58% lookUpWireIDForProxy28.9% lookUpOrCreateLocalProxyForObject 11.2% I'd really appreciate any suggestions about why this might be happening. Kevin Brock ap...@kevin.com ___ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com