title: ioSocket not emitting to browser on server heavy load
body: <p>Some requests that can be made to my nodejs server require heavy processing (for example: 5000 files). Since the request will take a while to process, I want to display progresses in the browser. For that, I'm using io-socket. Regularly, the server sends the progress advance to the client with for example <code>ioSocket.emit("log", "progress 24%)</code>.<br>
  However, if progress sending to the client usually works, when there is a big amount of files, it doesn't. Nothing is sent to browser.<br>
  I'm sure the process is going fine since I log progress to node terminal, and there it appears as expected.</p>
  
  <p>I'm wondering what I can do to have ioSocket.emit event work in heavy load case, because it's where it's most useful to see progress.</p>
  
  <p>The files processing function looks like this:</p>
  
  <pre><code>var child_process = require("child_process");
  
  function (ioSocket) {
  
    ioSocket.emit("log", "start")
  
    var ratingCounts = 0;
    var listOfFilesRatings = []
  
    _.each(listOfFilesPaths, function(path, i){
  
      child_process.exec("exiftool -b -Rating "+ path, function(err, stdout){
  
        if (err) console.log(err)
        else {
  
          listOfFilesRatings.push(stdout);
          ratingCounts++;
  
          ioSocket.emit("log", "rating test progress "+ ratingCounts)
  
        };
  
      });
  
      ioSocket.emit("log", "each progress "+ i)
  
    });
  
  
  }
  </code></pre>
  
  <p>In this example, only the first "start" emit will be fired to the browser.</p>
  
  <p>However if I do the following:</p>
  
  <pre><code>function (ioSocket) {
  
    ioSocket.emit("log", "start")
  
    for (i=0; i&lt;1000; i++) {
  
      ioSocket.emit("log", "each progress "+ i)
  
    };
  
  }
  </code></pre>
  
  <p>everything works fine, and I get the "start" and all "each progress" sent to browser.</p>