Mongoose lean() vs hydrated documents: choose read performance or full document features
Decide between Mongoose lean() and hydrated documents for read-heavy Node.js APIs, with trade-offs, a compact comparison, and a verification script.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Decide between Mongoose lean() and hydrated documents for read-heavy Node.js APIs, with trade-offs, a compact comparison, and a verification script.
Use Mongoose’s .lean() to skip document hydration on read‑heavy endpoints, saving CPU and memory. Learn when it’s safe, how to enable virtuals, and benchmark the benefit.