- Issue created by @berdir
- 🇨🇭Switzerland berdir Switzerland
As an additional improvement, I'd add a check to scheduler_form_alter() to see if this is even an entity form ($form_state->getFormObject() instanceof EntityFormInterface, at least for the methods that expect it.
- 🇨🇭Switzerland berdir Switzerland
I see this was already improved recently in ✨ Implement static caching around SchedulerManager::getPlugins() Active but I'd go further and remove the persistent cache completely.
- 🇨🇭Switzerland berdir Switzerland
Created a merge request with some suggestions.
With the change in the other issue, it's better, but it still shows up in blackfire. Converting to only a property, getPlugins() no longer shows up at all, and by converting getEntityFormIds() to fast chained cache, scheduler_form_alter() is now no longer visible in blackfire as well.
Additionally, I changed the getTypes() call to using the bundle info service, that's faster (loading all config entities just to get their ids is very expensive), and it would also work for entity types that don't use bundle config entities. That could also be skipped for this issue, didn't do DI and so on.