

This works great, the memory buildup is perfectly managed as long as we deal with reasonably sized objects. To achieve this, we directly control the MongoDB cursor data emission as documented on the official node driver doc. Contextįor performance reasons (memory accumulation mainly), we switched from a classic data consumption mode (retrieve whole objects in memory and send them to the client) to a streaming consumption mode. Sorry if this question already exists but I could not find resources on this topic neither on the web nor in the source code of the NodeJS MongoDB driver.
