title: CakePHP 3 Ajax Call Performance issue
body: <p>We have done the below code element (text posting by ajax) in cakephp 2.5. </p>
  
  <p>Later, when we changed to cakephp 3, it seems like the performance of the function is diminished to a very noticeable extend in comparison with version 2.5 (mainly execution time has increased from 250 ms to 1.4s)</p>
  
  <pre><code>// ajax call to save post
  $.ajax({
       type: "POST",
       url: baseUrl + 'posts/add',
       data: data,
       dataType: "json",
       success: function(response, status) {
           if(!response.success) {
                alert('An unexpected error has occurred!');
           }else{
                append_post(response.post_id);
           }
       },
       error: function(response, status) {
           console.log(response);
           alert('An unexpected error has occurred!!');
       }
  });
  </code></pre>
  
  <p>This is the php code:</p>
  
  <pre><code>//posts/add  function
  public function add()
  {   
      $this-&gt;layout ='ajax';
      $this-&gt;autoRender = FALSE;
      $post = $this-&gt;Posts-&gt;newEntity();
  
      if ($this-&gt;request-&gt;is('post')) {
          $status['success'] = FALSE;
          $post = $this-&gt;Posts-&gt;patchEntity($post, $this-&gt;request-&gt;data);
  
          if ($this-&gt;Posts-&gt;save($post)) {
               $status['success'] = True; 
               $status['post_id'] = $post-&gt;id; 
          }
          $this-&gt;response-&gt;body(json_encode($status));
          return $this-&gt;response;
     }
  }
  </code></pre>