• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSConnection recursion -- (was Re: Long term performance of NSConnection)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnection recursion -- (was Re: Long term performance of NSConnection)


  • Subject: NSConnection recursion -- (was Re: Long term performance of NSConnection)
  • From: Kevin Brock <email@hidden>
  • Date: Tue, 07 Jul 2009 11:25:29 -0700

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 (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


References: 
 >Re: Long term performance of NSConnection (From: Kirk Kerekes <email@hidden>)

  • Prev by Date: Re: Bound array item is repeatedly copied and collected while scrolling table view
  • Next by Date: Re: Bound array item is repeatedly copied and collected while scrolling table view
  • Previous by thread: Re: Long term performance of NSConnection
  • Next by thread: How do I get the version of AppKit.framework available in Cocoa Application Framework 10.5? Probably a dumb question I know..
  • Index(es):
    • Date
    • Thread