• 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: How to ease the burden on the Garbage Collector?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to ease the burden on the Garbage Collector?


  • Subject: Re: How to ease the burden on the Garbage Collector?
  • From: Bill Bumgarner <email@hidden>
  • Date: Thu, 08 Oct 2009 08:08:32 -0700


On Oct 8, 2009, at 7:29 AM, Gabriel Zachmann wrote:

It seems that about 20% of the time is spent in the Garbage Collector thread!

Which is a bit surprising to me, since I don't allocate a large number of objects (I think) -- just a small number of large objects (the images).

The collector only chews CPU when there are lots of allocation events (and, hopefully, deallocation events) that are causing the collector to believe it needs to do work. Or when something is triggering the collector manually really often.


Have a look at ObjectAlloc & ObjectGraph in Instruments. That should give you an idea if there are lots and lots of allocation events occurring and, if so, what they are. From there, it is a matter of minimizing the number of allocations occurring.

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


  • Follow-Ups:
    • Re: How to ease the burden on the Garbage Collector?
      • From: Gabriel Zachmann <email@hidden>
References: 
 >How to ease the burden on the Garbage Collector? (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: NSOpenPanel Performance the Second Time
  • Next by Date: Re: How to ease the burden on the Garbage Collector?
  • Previous by thread: How to ease the burden on the Garbage Collector?
  • Next by thread: Re: How to ease the burden on the Garbage Collector?
  • Index(es):
    • Date
    • Thread