• 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: Prioritizing drawing of the important stuff
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prioritizing drawing of the important stuff


  • Subject: Re: Prioritizing drawing of the important stuff
  • From: Peter Tomaselli <email@hidden>
  • Date: Sat, 29 Oct 2016 10:54:30 -0400

Not at all my area of expertise, but I was going to suggest some sort of debounce-style approach as well. That is, there is somewhere an event stream that is firing off “please redraw everything” events (I think you said this was a KVO subscription) at some potentially excessive rate, right?

So I would debounce that twice into two new streams: once to create a “redraw the lightweight stuff” event stream that’s capped at 30 Hz (or whatever), and a second time to create a separate “redraw the slow stuff” event stream at 5 Hz (or whatever).

So, nothing to do with monkeying about with how the system prioritizes drawing internally, instead “sanitizing” your event stream up front based on what you know about the drawing performance characteristics downstream.

Apologies if this is way off base, I have very little experience with Cocoa drawing itself. :)

Peter

> On Oct 29, 2016, at 7:40 AM, Jonathan Taylor <email@hidden> wrote:
>
> The point, though, is that the slider will happily update pretty much as as often as the CPU allows. The issue is how to control what the OS considers to be "smooth enough" slider updates - there's a point at which I'd much rather have it "only" update the slider and the quick-to-draw image 10 times/sec, and have a bit of time spare to do the low-priority drawing, rather than updating the slider and easy image 60 times/sec.
>
>> On 29 Oct 2016, at 12:27, Slipp Douglas Thompson <email@hidden> wrote:
>>
>> You could just set up a simple debounce timer— reset it back to 0sec elapsed time whenever the slider is updated, and if it reaches a small delay then the HQ image is rendered (and remains on-screen until the slider is later moved and the process repeats).  No need to rely on GCD or threading.
>>
>> — Slipp

_______________________________________________

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: 
 >Prioritizing drawing of the important stuff (From: Jonathan Taylor <email@hidden>)
 >Re: Prioritizing drawing of the important stuff (From: Slipp Douglas Thompson <email@hidden>)
 >Re: Prioritizing drawing of the important stuff (From: Jonathan Taylor <email@hidden>)

  • Prev by Date: Re: Prioritizing drawing of the important stuff
  • Next by Date: Re: Prioritizing drawing of the important stuff
  • Previous by thread: Re: Prioritizing drawing of the important stuff
  • Next by thread: Re: Prioritizing drawing of the important stuff
  • Index(es):
    • Date
    • Thread