Performance: Queued notifications
HIGH IMPACT
This affects how quickly the page responds to user actions by offloading notification sending to background jobs, improving interaction speed.
Notification::send($user, (new InvoicePaid($invoice))->delay(now()->addSeconds(5))); // or using ShouldQueue interface on notification class $user->notify((new InvoicePaid($invoice))->delay(now()->addSeconds(5)));
Notification::send($user, new InvoicePaid($invoice));
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous notification sending | N/A | N/A | Blocks server response delaying paint | [X] Bad |
| Queued notification sending | N/A | N/A | Server responds immediately, faster paint and interaction | [OK] Good |