• 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
Garbage collection performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Garbage collection performance


  • Subject: Garbage collection performance
  • From: AndrĂ© Pang <email@hidden>
  • Date: Fri, 22 Feb 2008 00:54:19 +1100

Hullo,

I'm experimenting with a GC build of my application, and during one long-running task, Shark's telling me that 57% of the total application time is spent in Auto::Zone::collect(). In real-world testing, it seems that the GC version is somewhere around twice as slow as the non-GC version.

So, a simple question with undoubtedly not-so-simple answers: what techniques can I use to make things go faster? I've read the (updated) Garbage Collection Programming Guide, but there's little there about optimising GC performance. We only have a few classes with finalizers. We use NSAutoreleasePools a lot, and I've tried using -drain rather than -release for them, which doesn't seem to make a difference. I could obviously allocate some objects from a custom NSZone or disable GC in performance-intensive bits, but that kinda defeats the purpose of it :). I sorta tried vaguely tuning the collector via the API in objc-auto.h, though I don't really know how to tinker those values well. So, any tips?

One extra note: we use a lot of "dual-mode" (GC supported but not required) frameworks and plugins in this application. I figured that building stuff as GC only would probably be faster, but only by pretty insignificant amount. Would that theory be correct?


-- % Andre Pang : trust.in.love.to.save <http://www.algorithm.com.au/>



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Prev by Date: Re: 10.5.2 broke my open panel code!
  • Next by Date: Re: NSWindow title bar icon without representedURL
  • Previous by thread: Re: Use pdfkit to display a batch of pictures...
  • Next by thread: Re: Garbage collection performance
  • Index(es):
    • Date
    • Thread