• 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: Changing dock icon on the fly a lot = molasses?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing dock icon on the fly a lot = molasses?


  • Subject: Re: Changing dock icon on the fly a lot = molasses?
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 07 Sep 2006 08:45:48 -0700


On Sep 7, 2006, at 8:36 AM, Craig Hunter wrote:

It works fine, but I notice that my app starts to feel slower and less
responsive with a lot of these calls over a long period of time (days).


I am using the dock icon as a progress/status display that changes about
every 5 seconds, so over days of running the app there can be tens of
thousands of calls to change the dock icon. Is this slowdown expected (ie,
am I doing something totally unreasonable), or could I be handling this
better? I have tried profiling with Shark to see if I could tell what was
slowing down, but haven't really been able to pin it down. The only thing I
know for sure is that not calling this subroutine every 5 seconds eliminates
the problem. I am also badging the dock icon with a few simple drawing
operations after the icon change, but have eliminated that as a cause.

This sounds like a memory leak to me. I would launch your application with ObjectAlloc (select track objc allocations, etc.) and let it run long enough to get to a steady state of memory usage then set a marker. Then view memory allocations relative to that marker. Look for allocation instances that build up after that point (the second column is the one to watch for this if IIRC).


If you do find instances building up you can pause the application in ObjectAlloc and look at the allocations events for a representative instance to understand who created it and/or retained it.

Note xcode provides an launch with option for this in its build menu.

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Re: Changing dock icon on the fly a lot = molasses?
      • From: "Shawn Erickson" <email@hidden>
References: 
 >Changing dock icon on the fly a lot = molasses? (From: Craig Hunter <email@hidden>)

  • Prev by Date: NSCell draw update
  • Next by Date: Re: Re: Changing dock icon on the fly a lot = molasses?
  • Previous by thread: Changing dock icon on the fly a lot = molasses?
  • Next by thread: Re: Re: Changing dock icon on the fly a lot = molasses?
  • Index(es):
    • Date
    • Thread