title: bulk upload through fileupload with rails is very slow
body: <p>I am trying to use jquery fileupload to upload a bunch of files to server. I have a form which i use to upload multiple files (around 1500 at a time). The total size is not much -66 mb or so. Yet, the file upload process takes to much time to even start. </p>
  
  <p>There is no JS response for a long time and the browser freezes.  I just have an upload progressbar and and error for the list of files that are not successfully uploaded.</p>
  
  <p>What can i remove/ what should I do to make this process faster?</p>
  
  <pre><code>&lt;script type="text/javascript" charset="utf-8"&gt;
  var maxFiles = 100000;
  var filestoupload =0;   
    $(function () {
        // Initialize the jQuery File Upload widget:
        $('#fileupload').fileupload({
          autoUpload: true,
          progressall: function (e, data) {
            var progress = parseInt(data.loaded / data.total * 100, 10);
            $('#progress .progress-bar').css(
                'width',
                progress + '%'
            );
            document.getElementById('progress_value').innerHTML = progress+ '%';
          },
          submit: function (event, files) {
              var fileCount = files.originalFiles.length;
              document.getElementById('total_files').innerHTML = fileCount.toString()+' file(s) for upload';
              if (fileCount &gt; maxFiles) {
                  alert(fileCount + " files at a time? The max number of files uploadable at a time is "+maxFiles);
                  throw 'This is not an error. This is just to abort javascript';
                  return false; 
              }
          }
  
        });
  
    });
  &lt;/script&gt;
  </code></pre>