• 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: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling


  • Subject: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • From: Kyle Sluder <email@hidden>
  • Date: Mon, 06 Aug 2012 17:47:57 -0700

On Mon, Aug 6, 2012, at 05:34 PM, Dave Keck wrote:
> > But Mike is still right; you're probably better served by using -performSelectorOnMainThread::: rather than waking the run loop up yourself.
>
> I tend to disagree -- invoking CFRunLoopPerformBlock() and
> CFRunLoopWakeUp() is likely more performant since they're at the CF
> level (which -performSelectorOnMainThread eventually calls into), and
> a block-based API is more convenient. Furthermore,
> -performSelectorOnMainThread: wakes up the target run loop anyway by
> invoking CFRunLoopWakeUp().

You're thunking across a thread boundary; whatever performance
improvement you're imagining (unless you've already measured your
performance?) is certainly overshadowed by thread synchronization.

>
> > Given that it's a private mode, I'm not sure you really want your code executing during the scroll event coalescing mode.
>
> Agreed -- I wasn't using nor advocating NSScrollEventCoallescing.
> (Also note that calling CFRunLoopWakeUp() on the main thread while
> it's running in the NSScrollEventCoallescing mode won't cause it to
> execute the block passed to CFRunLoopPerformBlock(...,
> kCFRunLoopDefaultMode, ...) until the run loop is again running in the
> default mode.)

This is true; I overlooked this.

--Kyle Sluder
_______________________________________________

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: 
 >10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Quincey Morris <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Kyle Sluder <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Mike Abdullah <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Kyle Sluder <email@hidden>)
 >Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling (From: Dave Keck <email@hidden>)

  • Prev by Date: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Next by Date: Re: Debugging -setNeedsDisplayInRect:
  • Previous by thread: Re: 10.8 copiesOnScroll, -setNeedsDisplayInRect: ignored during scrolling
  • Next by thread: compile DrawKit in 10.8
  • Index(es):
    • Date
    • Thread