How does Meteor perform multiple subscriptions to larger documents?

I am currently developing a database for a fairly large meteorite application and we are discussing whether Meteor will perform better with more subscribers, collections of tiny documents, or fewer subscribers to collections of large documents.

Some of these documents can eventually get quite large, such as user favorites or preferences that are only available to an individual user in a particular view.

In terms of numbers, we are talking about 10 subscriptions, at least four of which will not be sequentially signed either, returning only one larger document in certain representations.

Compared to 4 subscriptions to collections of possibly quite large documents (I realize these custom views are likely to be faster to have data already on the client).

Any ideas or empirical evidence would be incredibly helpful.

Thank.

+3


source to share


1 answer


This is probably not a complete answer. I am currently solving this problem myself.

I have experience with large datasets. I subscribe to one collection without any restrictions:

Meteor.publish('collectionName', function () {
    return collectionName.find();
});

      

My collection contains 400 documents with a total size of approximately 600KB (after resetting the collection with mongodump

). With 100 users on the system (using it daily from different continents) we have several performance issues:



  • When I load a page with 400 items, you can watch the list being filled.
  • It is also important what you do with 400 documents. Each of my entries is a fairly complex DOM node with a few helpers being executed on each element.

DOM generation takes some time and causes a spike on the client processor. In addition, a large amount of data is transmitted to the client.

A few ideas for solving problems:

+1


source







All Articles