Answer the question
In order to leave comments, you need to log in
What is the page generation time for a simple site on Symfony2?
I understand that the question is about a horse in a vacuum, so let's fill the vacuum a little:
Let's say there is a main page of the blog.
It displays the last 10 posts (picture + announcement), a menu from the database.
As a server - VDS at 800Mhz (almost the simplest)
Symphony production mode with settings from the documentation.
A set of non-standard bundles:
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),<br>
new FOS\RestBundle\FOSRestBundle(),<br>
new FOS\UserBundle\FOSUserBundle(),<br>
new JMS\SerializerBundle\JMSSerializerBundle(),<br>
$t1 = microtime(true);<br>
.....<br>
echo '<!-- '.(microtime(true) - $t1).' -->';<br>
Answer the question
In order to leave comments, you need to log in
I think it's FOS, but I could be wrong. I myself experiment with symphony and putting admin panels with FOS on board - the work slows down a lot. In general, symphony has a web profiler in the standard package, it will tell you a lot.
For example, it will reflect all requests + build a beautiful graph from the logs
What is more valuable to you: technology, the number of which on the planet tends to infinity, or your time, which is very limited?
In general, there is xDebug and you can easily find out which module is the most
If you are using composer, try it composer dump-autoload -o
to speed up autoloading.
It eats too much memory, For a blog no more than 5-10 mb. Most likely app_dev.php is used.
Do you have cache enabled? Are you using app.php front controller (env=prod, debug=false, AppCache instead of AppKernel)?
See the Performance section in the documentation. For me, for example, autoloader caching in APC hung performance by almost 20%.
Well, if you have a lot of content for unauthorized users, install varnish and everything will fly.
Projects are more likely to run into browser DOM rendering speed than during page generation. 0.4 sec is of course long, but quite acceptable. This is an acceptable fee for the ready-made functionality of the framework.
If there are no special requirements for hardware and load stability of the application, then you should use it without hesitation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question