DEV Community

Discussion on: Get MongoDB data 10x smaller & faster using lean function in NodeJs

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

I am looking forward to working with the "lean" function as I have a lot of data and it takes a lot of time as well. So, I definitely have to try this function in my production environment as well.

Collapse
 
deepakjaiswal profile image
Sandeep • Edited

lean function reduce the size of document so its affect the response.
check all details
mongoosejs.com/docs/tutorials/lean...
if you have more data you can use compression npm package

Collapse
 
abdurrkhalid333 profile image
Abdur Rehman Khalid

thanks for mentioning this here, I will have a deeper look into that as well.