Performance: Notification channels (mail, database, SMS)
MEDIUM IMPACT
This affects how quickly notifications are delivered and how much server and network resources are used during notification processing.
Notification::send($user, new InvoicePaid($invoice)); // queued notifications (notification implements ShouldQueue)
Notification::send($user, new InvoicePaid($invoice)); // sends mail and SMS synchronously| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous mail and SMS sending | 0 | 0 | 0 | [X] Bad |
| Queued mail and SMS sending | 0 | 0 | 0 | [OK] Good |
| Database notifications without indexes | 0 | 0 | 0 | [X] Bad |
| Database notifications with proper indexes | 0 | 0 | 0 | [OK] Good |