- Issue created by @marksmith
- 🇩🇪Germany jurgenhaas Gottmadingen
First of all, a performance penalty is not an issue. ECA stores the list of subscribed events from your active models in Drupal's state. This list is stored together with arguments to determine if an event applies or not. For that reason, it's very lightweight to determine if an event applies or not. That doesn't require any significant compute power.
To determine, how often that assertion needs to be tested is the product of that event being dispatched by Drupal and the number of events being used in your active models. Let's say, that event is dispatched twice on a page, e.g. from the search form and a newsletter subscription, and you have 5 different events in your models for the form build, you would then see this assertion 2*5 = 10 times in the debug log.