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

Re: NSTrackingArea message lag


  • Subject: Re: NSTrackingArea message lag
  • From: Graham Cox <email@hidden>
  • Date: Fri, 27 Jun 2008 10:21:36 +1000


On 27 Jun 2008, at 3:42 am, Markus Spoettl wrote:

On Jun 26, 2008, at 4:15 AM, Graham Cox wrote:
I think this is your problem. After the first rect is marked as needing update, the needsDisplay method will return YES. That then rejects all subsequent rect marking until the next event loop and the view has been redrawn. Then another rect gets a shot, and so on. Simply removing that if([![self needsDisplay]) should fix your problem, I think.

For whatever reason, simply calling -setNeedsDisplay:YES without update rectangle and needsDisplay check is producing the same kind of lag. The view is not updated any faster or more accurately. Granted, the needsDisplay check may be wrong though, I can see the issue there.


you can still (and should) use -setNeedsDisplayInRect:, just don't make this conditional on -needsDisplay.

I think to really get to the bottom of the delay problem we'd need to see the code in its full context. For example how does your drawRect: method know which rect(s) to repaint? Or does it just go over the whole lot? There could be many reasons why it's slow.

Graham

_______________________________________________

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: NSTrackingArea message lag
      • From: Markus Spoettl <email@hidden>
References: 
 >NSTrackingArea message lag (From: Markus Spoettl <email@hidden>)
 >Re: NSTrackingArea message lag (From: Quincey Morris <email@hidden>)
 >Re: NSTrackingArea message lag (From: Markus Spoettl <email@hidden>)
 >Re: NSTrackingArea message lag (From: Graham Cox <email@hidden>)
 >Re: NSTrackingArea message lag (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: NSSpeechSynthesizer and empty strings
  • Next by Date: Re: description and proxy objects
  • Previous by thread: Re: NSTrackingArea message lag
  • Next by thread: Re: NSTrackingArea message lag
  • Index(es):
    • Date
    • Thread