Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>TL;DR; Set realpath_cache_size to a value > 1000</strong></p> <p><strong>Edit 2:</strong> Problem solved in this PR: Try to set PHP.ini's realpath_cache_size to a value > 1000 A symfony requirement was recently added fixing this issue: <a href="https://github.com/sensiolabs/SensioDistributionBundle/commit/cf0179711b24d84d4a29d71a4010540f4c990bd8" rel="nofollow noreferrer">https://github.com/sensiolabs/SensioDistributionBundle/commit/cf0179711b24d84d4a29d71a4010540f4c990bd8</a></p> <p><strong>Edit:</strong> I just saw this answer: <a href="https://stackoverflow.com/a/17914570/980547">https://stackoverflow.com/a/17914570/980547</a> And it decreased page generation time by 4 on windows when I set realpath_cache_size=4096k in my php.ini (!)</p> <p><strong>Old answer:</strong></p> <p>So, I did a comparison between both with webgrind:</p> <p>On windows (fast computer), called app_dev.php:</p> <p><img src="https://i.stack.imgur.com/3gkQP.png" alt="Web toolbar"></p> <p>So you can see that the web toolbar shows a 764ms time generation (increased because of xDebug and profiling, but still relevant). Webgrind shows:</p> <ul> <li>651 calls to file_exists() for a time of 232ms (which is a lot!)</li> <li>603 calls to filemtime() (211ms)</li> <li>230 calls to UniversalClassLoader->loadClass() (119ms)</li> <li>230 calls to UniversalClassLoader->findFile() (38ms)</li> </ul> <p>On linux (slow computer), app_dev.php:</p> <p><img src="https://i.stack.imgur.com/AVlL8.png" alt="Web toolbar"></p> <p>298ms of total generation time (which is more than twice less than on windows).</p> <ul> <li>237 calls to UniversalClassLoader->findFile() (36ms => 4 times less)</li> <li>237 calls to UniversalClassLoader->loadClass() (20ms => 2 times less)</li> <li>623 calls to file_exists() (4ms only !!!)</li> <li>605 callsd to filemtime() (4ms only !!!)</li> </ul> <p>The problem seems to be file_exists() and filemtime(), which are much slower on windows than on Linux. On windows, PHP is looking for files with file_exists, filemtime, loadClass or findFile for 60% of the time. Is that a known problem ?</p> <p>Edit : so the problem is only for the dev environment, in production no file_exists are done since everything is cached.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload