Performance: Bulk operations
HIGH IMPACT
Bulk operations impact server response time and client rendering speed by reducing the number of requests and database transactions.
response = requests.post('/api/items/bulk', json=items)
process(response.json())for item in items: response = requests.post('/api/item', json=item) process(response.json())
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Multiple single requests | Multiple small updates | Multiple reflows | Higher paint cost due to delayed data | [X] Bad |
| Single bulk request | Single batch update | Single reflow | Lower paint cost with faster data | [OK] Good |