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 ApiController thanks 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 renamed ON_PUBLISH) events in DisplayBuilderSubscriber so we do an entity storage loads
  • We need Instance objects inside each implementation of IslandEventSubscriberInterface so 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 DisplayBuilderSubscriber and Islands
Command icon 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

pdureau created an issue. See original summary.

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Active » Needs review

Hi,

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.

mogtofu33 made their first commit to this issue’s fork.

  • mogtofu33 committed 4a17aa1a on 1.0.x authored by pdureau
    chore: #3578999 Pass existing Instance object to islands methods instead...
mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.