- Issue created by @Anul
- 🇬🇧United Kingdom danharper
I'm having the same issue, I'm trying to think of ways around using IEF as the original use case is a handful of entities where I have over 2500. Did you find a resolution ?
- 🇮🇳India kalpanajaiswal
Here is the thing.
If you look in to the file "inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php"
Inside function "formElement"
A piece of code written to call the theme hook for each referenced entity.$element['entities'] = [ '#tree' => TRUE, '#theme' => 'inline_entity_form_entity_table', '#entity_type' => $target_type, ];
For example if we have 1000 reference entity, this theme hook be called 1000 times and due to this process is gets slow.
Just remove the '#theme' attribute and test the functionality.
UI will be broken as theme is not there but process will me much faster.We faced the same issue and remove the '#theme' and handled broken UI separately
I am adding a screenshot for help.
I have just run a test with 25 reference entity, so there is nut much difference in loading time, but if you test this with more entity reference content like 200 or 300, you will see a huge difference.