Problem/Motivation
While working on #3578469: Make instance entities aware of display buildables, i have noticed once again (without being blocked by) an issue we have since the beginning of the project.
- We already have Instance objects in
ApiControllerthanks to Drupal automatic instantiation from routes - However, during event management, the entity object is lost and only the entity ID is kept
- We need Instance objects for
ON_SAVE(soon renamedON_PUBLISH) events inDisplayBuilderSubscriberso we do an entity storage loads - We need Instance objects inside each implementation of
IslandEventSubscriberInterfaceso we do many entity storage loads
This is complicated and, I guess, costly performance wise.
Proposed resolution
- Keep the instance object all along.
- Use it in
DisplayBuilderSubscriberand Islands
Issue fork display_builder-3578999
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
pdureau commentedHi,
This issue is only loosely related to #3578469: Make instance entities aware of display buildables and merging it is optional. Is the cost/risk bet OK or not?
However, it simplify a old part of the logic, and was also the opportunity to clarify some remaining "builder/instance/node" confusion.
Comment #6
mogtofu33 commented