Bulk re-evaluation calls AutomationRuleService::applyRules() once per transaction, and each call re-queried the user's entire rule set with its labels — an N+1 that scaled with the number of transactions being re-evaluated (the sibling ApplySingleAutomationRuleJob already loads the rule once). Memoize the rule collection per user for the lifetime of the service instance, which is resolved fresh per job/request, so rules created after it is built are intentionally not seen mid-run. Added a query-count test asserting automation_rules is queried once regardless of transaction count. |
||
|---|---|---|
| .. | ||
| .pest | ||
| Browser | ||
| Feature | ||
| Performance | ||
| Support | ||
| Unit | ||
| Pest.php | ||
| TestCase.php | ||
| bootstrap.php | ||