0

I started building and app and chose meteor as a platform, but I stumbled upon a problem, I need to serve large collections of data to user let's say 2000-5000 records, now I understand that having such large reactive collection is a problem for meteor, but the thing is I don't need it be reactive, I just need statistically display it to user whenever he requests it. I just started out with meteor and don't know of it's capabilities, so I wonder if something like this is possible? For example php queries ~3000 records from mysql and prints it to user in around 3 second.

But using meteor even for smaller collections let's say 500 records I have to wait for a lot more time: ~1min.

I have a clue that this slow loading might be caused by meteor default MongoDB implementation, and using external database should increase performance, though I did not tried it yet. Anyway, the question would be can I achieve fast loading of large data collections in meteor and if so how would I do that, and what are best practices of handling large collections in meteor?

PS. I chose meteor because I do need it's reactivity for some cases, with small collections. But I also need to serve larger static collections. But I wonder if I can combine both in meteor?

antanas_sepikas
  • 5,644
  • 4
  • 36
  • 67

1 Answers1

0

A couple of pointers, which may help with your static collections:

  1. Use 'reactive: false' in your find queries that don't need to be reactive as that'll stop meteor watching for updates.

http://docs.meteor.com/#/full/find

  1. Figure out what fields you need where and only return the bare minimum. You can use session variables to filter based on the context, which will make your publications a lot more effective.

http://docs.meteor.com/#/full/meteor_publish

  1. Surely the user doesn't need to see all 2000-5000 records at once? Are you not able to implement some sort of paging mechanism?

Best pattern for pagination for Meteor

Community
  • 1
  • 1
dsc
  • 222
  • 3
  • 9