slow Meteor fetch after quick find

269 views Asked by At

We are using Kadira to try to determine why our Meteor application is running slow at times. You can see in the picture that the find operation is fast while fetch took almost 7s. I know it's an open question but does any have an idea of what could be causing this?

enter image description here

1

There are 1 answers

1
Ruben On

The find command will return a cursor, which is a pointer to objects in database while the fetch will return an array with all the objects directly to your browser.

It seems you are retrieving a lot of objects since 6 seconds is a lot of time. I will suggest you to check if you really need to fetch too many objects, since maybe the user will not see all the data in just one screen.

Maybe you have already the data in your local MongoDB, and you can query them by chunks. (Using the limit constraint in MongoDB).