-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Controllers in Symfony 2.6.0 slower than 2.5.x? #12790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
so do you see any events taking a lot longer time in the profiler? and is this in the dev or prod env? make sure to test both. |
I tested both, it's the same performance drop. Well, there is a slight increase in kernel.response from 3ms to 5ms and also the memory seems to come from that event. Am I reading the timeline correctly that the Doctrine service reports being done in 2ms, however the timeline stretches far beyond that? |
According to your timeline, the memory consumption of Doctrine exploded from 5.2 MB to 17.8 MB. Could that be the origin of the problem? |
Be careful that the Doctrine blocks in the timeline are the DBAL queries, not the whole Doctrine logic (the ORM takes some time too). I suggest doing a bloackfire.io profiling to find the bottleneck (it is in public beta now, so you can get access on it) |
blackfire.io being the correct URL :) |
indeed. |
Hi, |
@jb18 : we're still waiting for someone to share some more profiling information. |
Sorry, I haven't got the time yet to analyze this more thoroughly. It seems though that with 2.6.1 there is still a performance drop, but not as pronounced. I will probably not get to an in-depth analysis before Christmas... |
@YetiCGN Thanks :). Ideally, with Blackfire, it should be quite easy and useful, when you have some time. |
@YetiCGN i have the same problem and revert symfony to the latest 2.5 version |
@YetiCGN @aLkRicha I'll be happy to help to analyse the profiling results. Could any of you provide a simple app reproducing the problem, or perhaps xhprof profiles (before/after)? |
@YetiCGN can you try with these settings please:
If you're using the latest Doctrine 2.5, that will free you from one db call that Doctrine added recently for fetching the server version (when it is not already configured explicitly). |
Little side note, in Symfony 2.6.4 with Doctrine DBAL 2.5.1 the performance is "back" to 2.5.7 levels. I have not yet begun to dig into the reasons for this. Thanks for all your feedback! I will leave this open in case I have a spare weekend sometime in the future to get to the bottom of this. |
@YetiCGN Thanks for the feedback. I'm going to close it now and feel free to reopen when you have more information. Thanks. |
i have the same performance problem and reverted back to 2.5.x |
@jakzal sorry for the late answer for me the solution is just to not use sf2 > 2.5.x. i cant use blackfire as i m on windows. |
@bdujon since you managed to reproduce it, if you put the code in a public repo I'll have a look. |
@bdujon can you confirm this is in prod env (not debug)? |
wait, are you saying it's slower on the demo without any changes? |
On my Windows 8 PC, things are a little bit slower in production (a fresh installation with just AcmeDemoBundle registration and routing moved to prod), but not as dramatic as @bdujon:
(please note that I ran the page multiple times and all results were consistent around 300 for 2.6 and 260-270 for 2.5) |
OS X, PHP 5.5.14, prod mode:
|
i m sorry i can't reproduce it on AcmeDemoBundle anymore. Now the timer are the same ... (i guess i got tricked by my laptop cpu that must have changed its speed while testing on different page.. each time ... ! ) The problem was never on prod environment but only on dev environment. |
ok i think i found it. It s at least coming from the choice type form renderer. public function listAction(Request $request)
{
$form = $this->createFormBuilder()
->add('list', 'choice', ['choices' => range(0,10000)])
->getForm();
return ['form' => $form->createView()];
} view : {% block content %}
{{ form_row(form.list) }}
{% endblock %} This takes 570ms with sf 2.5 and 2500ms with sf 2.6 on dev env. |
it s because of #10887 # app/config/config.yml
translator:
logging: false i can live with that :) |
@aitboudad i got 800ms with 'choice_translation_domain' => false. So i d say that fix it in a much better way than disabling globaly the translation log, thanks ! (now i want to use 2.7 with the fancy translation/twig debugbar :) ). But there is another problem and maybe that has nothing to do with it but when i remove 'choice_translation_domain' to get the default behavior the debug bar goes into 404. |
@bdujon nice, I'd say without translation warning logger I think it's difficult to detect those calls.
I'll check it :) can I close this issue ? |
Yes you can close it. Thanks everyone for your help :) |
Upgrading to Symfony 2.6.0 I experience slower delivery of every page in our project. The drag is always around 100 ms, which is a lot more than the same call takes with 2.5.7.
The profiler shows the "controller" section as the only difference. Apart from a 203 ms to 305 ms difference there is also a memory increase from 6 to 19 MB.
Before I go into debugging our own code and stripping it down to a minimum working example: Is anybody else experiencing this or might have a clue what could cause this?
The text was updated successfully, but these errors were encountered: