Search code examples
symfonydoctrine-ormapc

Symfony2 on shared hosting without APC - so slow


My symfony2/doctrine2 site is ready for production so I uploaded it to my shared (TSOHost) cloud server. They dont have APC activated and the site is super slow.

On my local env, pages take ~180ms to load with APC enabled and that doubles when I disable APC.

On the shared host the same pages take ~2 seconds to load and often hangs completely. My product listing page sometimes takes >30 seconds for the ajax request to load all the products!

It feels like doctrine is especially struggling.

My host can only suggest I move to a dedicated virtual server, which is obviously more expensive, but I dont want to do that unless I can be sure its going to resolve the problem.

Is this down to the lack of APC? Do I have any alternatives to APC?


Solution

  • My answer is:

    http://slides.seld.be/?file=2011-10-20+High+Performance+Websites+with+Symfony2.html#21

    Symfony2 is fast and lightweight but in heavy category. I've always cache the forms because form generation takes a years(with APC on). Look at this presentation and find some clues.