Problem/Motivation

\Drupal\consumers\Negotiator makes queries and loads an entity on every request. It doesn't need to do this.

Steps to reproduce

Make a request with the consumers module installed

Proposed resolution

Use cache and entity query techniques to minimise entity loading. Plus add a missing index.

Remaining tasks

User interface changes

None

API changes

New API to support getting the client ID only and not the consumer object from the request.

Data model changes

New index on client ID.

Issue fork consumers-3559900

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

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
e0ipso’s picture

Status: Needs review » Reviewed & tested by the community

This looks great! Thanks for the contribution and for the ping in Slack @alexpott.

e0ipso’s picture

Status: Reviewed & tested by the community » 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.

  • e0ipso committed 9c703b9b on 8.x-1.x authored by alexpott
    feat: #3559900 Optimise \Drupal\consumers\Negotiator for retrieving the...

Status: Fixed » Closed (fixed)

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