You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be due to minimongo's sort being inefficient, but it's hard to say without a minimal reproduction. Could you try to reproduce it with a minimal repo that contains just a dataset with ~500 records of the same size and doesn't actually render the data? That would help us figure out if it's minimongo or angular.
It is the minimongo which downgrades the performance due to large number of records. You must keep limited records in minimongo otherwise it will take a lot of time to traverse it. So currently I am subscribing the limited amount of data from server. So now its fine
@hassansardarlecodeur MiniMongo doesn't currently support indexes which would probably help this substantially, but #5678 is open in order to track this.
As mentioned in #6216 (comment), without a reproduction this is difficult to help troubleshoot. It sounds like you found an acceptable solution by limiting the number of records you're pulling into minimongo, so I'll close this off. Thanks!
I am building a page for admin in angular-meteor.
I have published all the records from a collection: "posts" and have taken the subscription of all the records on front end.
$meteor.subscribe('posts');
In the controller, if I select the cursors of all records from minimongo it works fine like:
$scope.posts = $meteor.collection(Posts);
But I want to display pagination, so for that I want limited records at a time like:
It stucks with the query in minimongo. And the browser hangs.
"posts" collection contains only 500 records. It was working fine when I had 200 records.
Can anyone give me an idea whats wrong with my code and concepts?
EDIT:
Okay! It worked fine when I commented the $sort line from query like this:
But I need to sort the records. So what should I do now?
EDIT:
Also tried adding index to the sort attribute like this:
db.Posts.ensureIndex({"cDate.timestamp": 1})
Still same issue
The text was updated successfully, but these errors were encountered: