title: Autocomplete result is very slow on input field search
body: <p>I have a input field. When the user type some value then it must autocomplete based on the user search. I am using following code. I am getting the data but it gets very slow if result is more than 50 and sometimes system crash out.</p>
  
  <p>How can I improve my code so that it works fine. </p>
  
  <pre><code>$( "#cc" ).autocomplete({
      delay: 0,
      source: function(request, response) {
          $.ajax({
              url: "&lt;?php echo site_url('registration/getData'); ?&gt;",
              data: { term: $("#cc").val()},
              dataType: "json",
              type: "POST",
              success: function(data) {
                  console.log(data);
                  if(data.response == "true"){
                      response(data.message);
                  }
              }
          });
      },
      minLength: 1
  });
  </code></pre>