Skip to content

Provide INotifier::preloadMany() to allow implementations to preload and cache data for many notifications at once #54231

@st3iny

Description

@st3iny

The INotifier::prepare() method is called once for every notification. If an implementation is fetching additional data for each notification this benefits performance. An implementation would then be able to query all data at once instead of doing multiple small queries.

Plan

  1. Provide IPreloadableNotifier::preloadMany(INotification[] $notifications, string $language): void (in a new interface).
  2. Add the method to the notification manager and only call it when a notifier implements the optional, new interface.
  3. Adjust all usages in the notifications app, for example, in EndpointController.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

☑️ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions