• Do you have APC installed? Have you got caching turned on? symfony2 does a lot of up front work - reading configs, routes etc, possibly in yaml which isn't fast, and then caches what it has discovered. Subsequent requests are very much quicker
      • 2
    • I have APC installed. I am using the app_dev.php to test the installation which caches some of the classes used by the framework. Before these files are cached the page load is around 12-13 seconds and goes down to 7-8 seconds after this. I think this problem may be related to my php installation instead of symfony but I dont know what could cause this.
    • I've been poking about in sf2 on Ubuntu over the last few weeks and not had similar problems. Have you installed PHP and Apache through the package manager? Is this RC7?
      • 1
    • Hmm ok, I installed php and apache through the ubuntu installer. I will try reinstalling them and see if that fixes the probllem. Thanks

Try disabling Xdebug completely.

I noticed in Symfony 1.3 / 1.4 that my page loads took 40%+ longer to load when Xdebug's profiler was running. I haven't tried Xdebug with Symfony 2.0 yet, but I imagine similar results would ensue.

The problem is that Symfony is a large framework that does a lot of background processing for you. When Xdebug is profiling this, your pages will take a lot longer to load.

Your best bet is to download a plugin for your browser that allows you to send the profiler flag to the server only when you need to use it. Xdebug can be setup to profile on request.

Here are my current Xdebug configurations on my development box:


xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "c:\var\profile\"
xdebug.profiler_output_name = "cachegrind.out.%t"
  • 16
Reply Report
    • @Daniel APC doesn't work well in Windows, it is sometimes (read: usually) even slower, from my own experience it can be as much as 100% slower. And WAMP stacks are also usually much slower than LAMP sorry for necroing thread..
    • Thank you so much. Its still taking a while to load on my windows machine but i have got the page loads down to 100ms on my ubuntu vm. It is a little annoying that this is happening though it could be due to a a combination of my php config settings. Thanks again :)

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions