• 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
Re: GC pros and cons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GC pros and cons


  • Subject: Re: GC pros and cons
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 25 Jun 2009 23:25:54 -0500

On Jun 25, 2009, at 10:32 PM, Adam R. Maxwell wrote:
Interesting. I found the Xcode editor to be unusably slow on a PowerBook G4 when Leopard was released; in fact, contrary to Bill's statement, I found that it grew worse in the last few months of Leopard seeding. I'm still sore about having to buy a MacBook Pro just to avoid beachballs while typing (rdar://problem/5572897). Even said MacBook Pro needs 4 GB of RAM to avoid hanging when switching to Xcode, since the collector thread evidently causes paging in to scan memory (which caused a beachball and hiccups switching apps in Spaces).


The specific issue of Xcode typing performance has been optimized significantly with each successive release. The underlying problem for #5572897 was that the parser used to color the code and do a bunch of other stuff was both inefficient and tickled the collector in just the wrong way.

Bringing this back to cocoa-dev specific issues.

Yes, the collector will keep more memory "hot" in an application than using retain/release. Where this comes into play is when you (a) hide an application and (b) do enough stuff in other applications that it causes the hidden app's pages to be paged out.

When reactivated, the app will have to pagein anything it needs to touch. GC can cause more stuff to be paged in.

However, in a complex application (like Xcode) that manages lots of stuff for which "is it up to date" checks must be performed semi- regularly, there will be a lot of page-thrash on reactivation regardless of GC or Non-.

Example; try using Aperture for a while and really build up a good sized working set. Hide it and beat on Xcode. Then activate Aperture. It can take a long time before the app is responsive again.

The bottom line is that you want to reduce the footprint of your application as much as you can as early as you can. Ditch objects. Prune caches. Optimize your undo stack to have a semi-minimal representation of the items within the stack. It'll lead to better overall system performance and make your app feel more snappy as your user activates/deactivates it.

b.bum
_______________________________________________

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: GC pros and cons (From: Quincey Morris <email@hidden>)
 >Re: GC pros and cons (From: Chris Idou <email@hidden>)
 >RE: GC pros and cons (From: Jeff Laing <email@hidden>)
 >Re: GC pros and cons (From: "Stephen J. Butler" <email@hidden>)
 >RE: GC pros and cons (From: Jeff Laing <email@hidden>)
 >Re: GC pros and cons (From: Quincey Morris <email@hidden>)
 >RE: GC pros and cons (From: Jeff Laing <email@hidden>)
 >Re: GC pros and cons (From: Peter Duniho <email@hidden>)
 >Re: GC pros and cons (From: Michael Ash <email@hidden>)
 >Re: GC pros and cons (From: Michael Ash <email@hidden>)
 >Re: GC pros and cons (From: Peter Duniho <email@hidden>)
 >Re: GC pros and cons (From: Bill Bumgarner <email@hidden>)
 >Re: GC pros and cons (From: Chris Idou <email@hidden>)
 >Re: GC pros and cons (From: Rob Keniger <email@hidden>)
 >Re: GC pros and cons (From: Chris Idou <email@hidden>)
 >Re: GC pros and cons (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: Ideas required on testing an application install
  • Next by Date: Re: NSViewController awakeFromNib and NSTableView numberOfRowsInTableView
  • Previous by thread: Re: GC pros and cons
  • Next by thread: Re: GC pros and cons
  • Index(es):
    • Date
    • Thread