Node.js · Senior · Question 12 of 75

Why can JSON.stringify of a large response be a bottleneck, and what helps?

Explanation

Fastify compiles a serializer from the response schema, which is faster and also drops fields not in the schema. For huge lists, paginate or stream.

Further reading

Problem with a question

Node.js · Senior · question 12

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz