{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/18011","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/18011/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/18011/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/18011/events","html_url":"https://github.com/symfony/symfony/issues/18011","id":138483345,"number":18011,"title":"Form submission (with relations) slows down after upgrade from 2.7.9 to 2.7.10","user":{"login":"jakubbialas3a","id":16755819,"avatar_url":"https://avatars.githubusercontent.com/u/16755819?v=3","gravatar_id":"","url":"https://api.github.com/users/jakubbialas3a","html_url":"https://github.com/jakubbialas3a","followers_url":"https://api.github.com/users/jakubbialas3a/followers","following_url":"https://api.github.com/users/jakubbialas3a/following{/other_user}","gists_url":"https://api.github.com/users/jakubbialas3a/gists{/gist_id}","starred_url":"https://api.github.com/users/jakubbialas3a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakubbialas3a/subscriptions","organizations_url":"https://api.github.com/users/jakubbialas3a/orgs","repos_url":"https://api.github.com/users/jakubbialas3a/repos","events_url":"https://api.github.com/users/jakubbialas3a/events{/privacy}","received_events_url":"https://api.github.com/users/jakubbialas3a/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD"},{"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-04T14:02:21Z","updated_at":"2016-03-12T14:37:16Z","closed_at":"2016-03-12T14:37:16Z","body":"Form fields \"entity\" and \"collection\" are probably loading whole collection of target entities when form is submitted. In previous version (2.7.9) it was loading only one selected entity.\r\n\r\nMy form for adding new orders:\r\n\r\n```php\r\n    $builder\r\n      ->add('name', 'text')\r\n      ->add('client', 'entity', array('class' => 'CoreBundle:Client'))\r\n```\r\n\r\nAnd now I have over 15k clients, and they are all loaded as entities when I submit form, so it takes some unnecessary time and memory. Accually I get memory exhausted error, because it takes over 128MB, and in 2.7.9 it takes less than 15MB.\r\n\r\n(I'm using form only for submitting rest api calls, not for rendering forms)"}}