Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
for big data observeChanges should be disabled
aslagle#467
  • Loading branch information
goolz authored Jan 1, 2019
1 parent 6163592 commit 6573ccb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ ReactiveTable.publish = function (name, collectionOrFunction, selectorOrFunction
options.fields = settings.fields;
}
var pageCursor = collection.find(filterQuery, options);
var fullCursor = collection.find(filterQuery);
var count = fullCursor.count();
//for big data observeChanges should be disabled
if (!(settings || {}).disablePageCountReactivity) {
var fullCursor = collection.find(filterQuery);
}
var count = collection.find(filterQuery).count();

var getRow = function (row, index) {
return _.extend({
Expand Down

0 comments on commit 6573ccb

Please sign in to comment.