I have an array of ids, and I want to make an api request for each id, but I want to control how many requests are made per second, or better still, have only 5 open connections at any time, and when a connection is complete, fetch the next one.  Cur...
Background  I am making a batch of HTTP GET requests to a server and I need to throttle them to avoid killing the poor server. For the purposes of my demo, this will be the GET method:  /*  *  This function simulates a real HTTP GET request, that alw...
I have this infinite scroll function set up on several of my pages. It works perfectly fine, but the Ajax call to load more items makes several database calls and it has to load a lot of images each time, and it usually takes several seconds to load....
I am a bit uncertain with the concepts of throttle and debounce functions.  As I get it:  we debounce a function that should be called after a certain event has happened. It is used in events like drag, keyup, etc. with the purpose of not firing all...
I have an observable that represents an action that is triggered by some outside component. For the purpose of this question, let's call it createBananaAction. I have a bananaService with a method create that performs an AJAX request and returns...
Library code (line 860 in question): https://github.com/jashkenas/underscore/blob/master/underscore.js  if (remaining <= 0 || remaining > wait)  When is the second half of this true?  Background - first post on SO and pretty new to javascript c...
Old Title: setTimeout throttle on window resize event in javascript continually fires in ie7  I have the following script:  jQuery(document).ready(function(){     throttleTest();  });  function throttleTest() {      var throttleTimer,         testCou...
So I've already written a function that works (based on underscores throttle) for functions that don't take in a parameter, but I'd like to make it generic enough to pass in a function with a variable number of parameters.  Here's wha...
I want to limit the execution of two different functions with the same throttle.  Let's say I have a function called A and another one called B.  I want to limit the number of executions of both of them so that if A is called at time 0, and the...
Let's say I have a server that sends data to its clients each time a client's data has changed. The client class looks like this:  function Client() {     this.data = {};     this.update = function (key, value) {         this.data[key] = valu...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.