- Issue created by @mglaman
- First commit to issue fork.
- Merge request !185Resolve #3539187 "Performance improvements in embed code factory class." → (Open) created by rajeshreeputra
Everytime \Drupal\acquia_dam\EmbedCodeFactory::getSelectOptions is called, the allowed image styles are calculated, even if the asset type is not image.
It also recalculates the thumbnail option on each call.
\Drupal\acquia_dam\Plugin\CKEditor5Plugin\MediaEmbedCode::getDynamicPluginConfig calls \Drupal\acquia_dam\EmbedCodeFactory::getSelectOptions multiple times.
1. Only populate `image` if asset type is null or image
2. Statically cache the results for future calls in the same request
Active
1.1
Code