3

Hy.

My question is about the same as this one :

So i have a big form in my views. In the controller side, i simulate a formType in order to persist it in database. This form has 3 outer relations. The main problem is (confirmed by debugging) this function:

$form->handleRequest($request);

In my case, this only one line takes 6 seconds of treatment (in production environment), about 9 in local dev environment

By reading the previous post (this one) it appears that the problem comes from Symfony background treatments where there is loops on each datas present in database. Which explains my 6 seconds due to 20K of occurences for one of my relational form.


My Question is simple. Is there a way to optimise my form Type ? Or must i do this manually ?

Thank you all

Community
  • 1
  • 1
ji_bay_
  • 221
  • 1
  • 6
  • Hey, could you tell me with what option you went ? I'm facing the same problem like described [here](http://stackoverflow.com/questions/32713363/symfony-validation-slow) – RVandersteen Sep 22 '15 at 19:41
  • Did you ever figure out a solution to this? I'm facing the same exact problem, except its taking over 30 seconds to run this single line of code. I'm thinking of validating the request myself and creating the entity myself as well, but only want to do that as a last resort – TrieuNomad Mar 30 '16 at 23:23

0 Answers0