title: Laravel page load time too slow even after running artisan optimized
body: <p>After deploying my <a href="https://www.codehub.vn" rel="nofollow noreferrer">website</a> on Amazon EC2, I am having an issue with page loading time, it takes too long to process the request.</p>
  
  <p>I'm pretty sure that this is the issue of the Laravel framework since I put a debug line in the beginning of <code>bootstrap.start.php</code>:</p>
  
  <pre><code>&lt;?php
  die();
  
  /*
  |--------------------------------------------------------------------------
  | Create The Application
  |--------------------------------------------------------------------------
  |
  | The first thing we will do is create a new Laravel application instance
  | which serves as the "glue" for all the components of Laravel, and is
  | the IoC container for the system binding all of the various parts.
  |
  */
  </code></pre>
  
  <p>Then it will run very fast, meaning no issue with Apache or load balancer...</p>
  
  <p>But if I put the debug line just before the <code>return $app;</code>:</p>
  
  <pre><code>require $framework.'/Illuminate/Foundation/start.php';
  die();
  </code></pre>
  
  <p>Then server takes too long time to process and exit the script and return the result to browser.</p>
  
  <p>It's slow for pages even without database connection and only go through controller and then return a nearly static view.</p>
  
  <p>I then tried to run this command again:</p>
  
  <pre><code>php artisan optimized
  </code></pre>
  
  <p>Or even tried with:</p>
  
  <pre><code>php artisan clear-compiled
  php artisan optimized
  </code></pre>
  
  <p>Then the site loads the very fast for the first several requests but then after a while, it's back to slow mode.</p>
  
  <p>I'm really don't how to fix this issue because the tweaks I applied at least it works but it didn't work for a long time.</p>
  
  <p>The version I'm using is Laravel 4.2.</p>