Performance: Bull queue integration
MEDIUM IMPACT
This affects backend task processing speed and responsiveness, indirectly impacting frontend user experience by offloading heavy tasks.
async handleRequest(data) { await this.bullQueue.add('heavyTask', data); return { status: 'processing' }; } @Processor('queue') export class TaskProcessor { @Process('heavyTask') async handleHeavyTask(job: Job) { await this.heavyTask(job.data); } }
async handleRequest(data) { // heavy task done synchronously const result = await this.heavyTask(data); return result; }
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Synchronous heavy task in request | N/A | N/A | N/A | [X] Bad |
| Asynchronous Bull queue processing | N/A | N/A | N/A | [OK] Good |