• 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
Optimizing View Drawing Code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Optimizing View Drawing Code


  • Subject: Optimizing View Drawing Code
  • From: Stephen Blinkhorn <email@hidden>
  • Date: Thu, 7 Jan 2010 17:58:36 -0600

Hello,

I'm using Cocoa for the GUI of some audio plugins I'm writing. In the GUI I have the need for accurate level metering via 16 meters spread around at various points in the GUI. For satisfactory results I need to update the screen 20 times a second. This is causing a lot of CPU overhead (at least more than I would like).

The cause of the CPU overhead isn't the messaging system between the audio processor and the GUI and neither is it the act of actually drawing to the screen in the drawRect: method.

The real cause seems to be all the view setup messaging that needs to happen after I mark the view with setNeedsDisplay:YES. My top hit in shark is: objc_msgSend (seems wrong for an app doing mostly DSP :).


I've tried using isOpaque:YES and also wantsDefaultClipping:NO but to very little avail.


Any thoughts on how I can reduce the amount of setup required behind the scenes for each redraw?

Thanks,
Stephen
_______________________________________________

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: Optimizing View Drawing Code
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Revolving scoreboard
  • Next by Date: Re: Optimizing View Drawing Code
  • Previous by thread: Re: ColorSpace Question
  • Next by thread: Re: Optimizing View Drawing Code
  • Index(es):
    • Date
    • Thread