• 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: Performance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance


  • Subject: Re: Performance
  • From: Jeremy Pereira <email@hidden>
  • Date: Mon, 16 Nov 2009 14:48:39 +0000

On 16 Nov 2009, at 06:14, Chris Carson wrote:

>
> The application runs pretty well, and running it through the Leaks instrument there are no leaks except for 16-bytes when the application is first starting caused by IOUSBLib. However, looking at it in the Activity Monitor, the real memory used starts off at 25 MB and steadily grows to 250+ MB while the virtual memory starts off at about the same and steadily grows to about the same or sometimes close to 500MB, over the course of several minutes. This especially happens if I don't move the mouse for a while, or don't have the application in focus. As soon as a move the mouse or bring the application into focus, it's as if an autorelease pool is drained and the memory drops back down to 30-40MB real and 30-40MB virtual. This is annoying since the application hangs for 5 seconds or so when this memory draining is occurring. Has anyone dealt with this before? Any ideas on what could be causing this and how to work around it?

It always used to be the case that NSTimer firings didn't count as "real" events so the autorelease pool didn't drain if the only "events" in your app were timer events.  As soon as you do something to fire a real event e.g. move the mouse or bring the app to the front, the autorelease pool drains.

I guess the work around would be to create your own pool at the beginning of the timer firing code and drain it at the end.


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


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
_______________________________________________

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: 
 >Performance (From: Chris Carson <email@hidden>)

  • Prev by Date: Re: Applying inline styles to a WebKit - Cocoa application.
  • Next by Date: Re: How can a plug-in bundle get access to its own resources?
  • Previous by thread: Performance
  • Next by thread: Re: Performance
  • Index(es):
    • Date
    • Thread