I modified the leaderboard example to use two collections:
Players = new Meteor.Collection("players"); Tasks = new Meteor.Collection("tasks");
The Players collection has 6 documents defined in the example.
> db.players.count() 6
The Tasks collection contains 48,000 documents.
> db.tasks.count() 48000
As soon as I open the browser, Node will switch to a 100% processor and the client will not be able to see any task entries.
Players.find().count() 6 Tasks.find().count() 0
I tried to determine the query criteria, but this only works on the server and does not help on the client.
Players.find({name:"Claude Shannon"}).count(); 1 Tasks.find({tid:"t36254"}).count(); 0
I assume that 48,000 documents are too much to sync. This leads to the fact that Node is bound to a 100% processor, and the client to such errors: http://i.imgur.com/zPcHO.png .
How to prevent the synchronization of everything and only get certain documents from the collection?
source share