KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Alright, so I'm building an application based in Node.js and I am using mongoose to handle my connection to mongodb. I have an endpoint that is such: getTestStream : function(req, res, conditions, callback) { Activity.find() .limit(1000) .run(function(err, activities) { if (err){ util.sendError(req, res, "Query Error", err); } else if (activities) { res.send(activities); } else { util.send('nope'); } }); } For some reason this call takes 700ms+ to complete. The same call without even applying a limit made from mongodb shell returns in about 4ms. It seems like such a simple query, so what's slowing it down so much? I'm guessing I've missed something obvious in configuration somewhere, but I have no idea. Thanks to anyone who can help on this. Other info: mongoose@2.6.0 mongodb@2.0.4 node@0.6.9
Tags (comma-separated)
Save Edits
Cancel