NestJS · Senior · Question 12 of 75
Why can class-transformer serialization become a bottleneck for large responses?
- 1It runs on a separate thread
- ✓Correct answer: It walks every object and applies decorators via reflection; for big lists, mapping to plain DTOs or using schema serializers is faster
- 3It sends each field in a separate packet
Explanation
Measure with realistic payloads. Pagination also limits the cost.