Are there mongo ... .fetch() size limits?

As in, will Meteor not return greater than some number or some sized cursor.fetch()? I ask because I get crazy slow query returns using Meteor that return in 1 second using the mongo cli. This is Meteor 1.3 and Mongo 3.2. I am going to try Mongo 3.0 as my next attempt to fix but thought I would ask.

These are queries on 500k and 15m doc collections.

i have personally run into browser crashes, lagginess, etc. when subscribing / fetching large amounts of data simultaneously on the client. a combination of taking advantage of limit + pagination on the client, and using find().forEach() on the server did the trick.

that’s a lot of data though - any reason you’re going with an approach that has to fetch so much at once?

Are your collections properly indexed for the queries you are running? This would be the only thing I could think of.

These queries execute in 1-2 seconds using the cli, and yes, I tested with and without indexes.

I was just querying larger collections. Not returning all of the data, maybe a subset. Also these are not pub/sub/method queries, simply just server side queries.

Had the same problems fetch seems to be insanely slow. Did not got fecent Feedback on it, ended up using agregations. Still interested in the source of the behaviour.

1 Like