I am using Symfony2 and Sonata Admin Bundle but I am encountering performance issues with entity listing in edit mode.
I have an article entity, and those articles can be linked to multiple biographies (~ 100 000 biographies in database).
Here is a part of my ArticleAdmin.php class.
protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('biographies', 'entity', array(
'class' => 'SJBiographyBundle:Biography',
'multiple' => true
))
->end();
}
This generates a select with my 100 000 biographies when I am editing my article (and it works fine), except that loading 100 000 objects from the database takes a lot of time.
With the latest version of Sonata Admin Bundle, the select comes with an autocompletion field.
My question is: is there any way to load only 50 or 100 biographies and to load more by filtering with the autocompletion field?
Thanks for your help!