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

Re: rate limiting calls


  • Subject: Re: rate limiting calls
  • From: John Pannell <email@hidden>
  • Date: Tue, 28 May 2013 08:50:08 -0600

Hi Torsten-

You might consider something like the coalescing described in this blog entry:

http://www.takingnotes.co/blog/2013/01/03/coalescing/

In short, you'd be using performSelector:withObject:afterDelay: to make the desired method call, and cancelPreviousPerformRequestsWithTarget:selector:object: to prevent the calls from piling up.

Hope this helps!

John

On May 28, 2013, at 8:41 AM, Torsten Curdt <email@hidden> wrote:

>> Quick question: how often are you calling setValue:? Every time it changes
>> or is it inside an NSTimer/CADisplayLink?
>
> Every time the user moves the slider.
>
>> Can you give us more information on this particular flow?
>
> If I execute the "setValue:" on each value change of the slider the UI
> feels too slow.
>
> What I currently have in mind is to just store the latest value. Then
> enqueue "update" calls in an async queue and in the update blocks only
> perform the update if the value is different from the previous/current
> one.
> Any easier or more elegant way you could think of?
>
> cheers,
> Torsten
> _______________________________________________
>
> 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


_______________________________________________

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: rate limiting calls
      • From: Torsten Curdt <email@hidden>
References: 
 >rate limiting calls (From: Torsten Curdt <email@hidden>)
 >Re: rate limiting calls (From: Igor Elland <email@hidden>)
 >Re: rate limiting calls (From: Torsten Curdt <email@hidden>)

  • Prev by Date: Re: What, exactly constitutes a mutable action on an instance?
  • Next by Date: Re: NSMapTable with C strings as keys
  • Previous by thread: Re: rate limiting calls
  • Next by thread: Re: rate limiting calls
  • Index(es):
    • Date
    • Thread