Skip to content

Form submission (with relations) slows down after upgrade from 2.7.9 to 2.7.10 #18011

@ghost

Description

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.

My form for adding new orders:

    $builder
      ->add('name', 'text')
      ->add('client', 'entity', array('class' => 'CoreBundle:Client'))

And 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.

(I'm using form only for submitting rest api calls, not for rendering forms)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions