Performance: Redis as message broker
MEDIUM IMPACT
This affects the responsiveness and throughput of message passing between Django components, impacting interaction speed and background task handling.
from celery import shared_task from django.core.mail import send_mail @shared_task def send_notification(): send_mail('Subject', 'Message', 'from@example.com', ['to@example.com']) # Triggered asynchronously via Redis broker
from django.core.mail import send_mail def send_notification(): send_mail('Subject', 'Message', 'from@example.com', ['to@example.com']) # Called directly in a view or request handler
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous task execution in request | Minimal | 0 | 0 | [X] Bad |
| Asynchronous task via Redis broker | Minimal | 0 | 0 | [OK] Good |