mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
Improve comments loading performance on long threads
This commit is contained in:
parent
3f323cd9cb
commit
35010cc245
3 changed files with 4 additions and 3 deletions
|
@ -1,8 +1,9 @@
|
|||
## v0.15 “SideScope”
|
||||
|
||||
* Improved performance when loading comments for long threads (thanks @dandv!).
|
||||
* Usernames are now case and space insensitive. `John Smith`, `JohnSmith`, and `johnsmith` are now all considered to be the same username (thanks @splendido!).
|
||||
* Romanian translation (thanks @razvansky!).
|
||||
* Now using `feedparser` instead of `htmlparser2` to parse RSS feeds (thanks @delgermurun).
|
||||
* Now using `feedparser` instead of `htmlparser2` to parse RSS feeds (thanks @delgermurun!).
|
||||
* Now supporting RSS categories (thanks @delgermurun).
|
||||
* Added new `postListTop` zone that only appears on post lists.
|
||||
* Now showing tagline on every post list.
|
||||
|
|
|
@ -6,7 +6,7 @@ Meteor.publish('singleCommentAndChildren', function(commentId) {
|
|||
var commentIds = [commentId];
|
||||
var childCommentIds = _.pluck(Comments.find({parentCommentId: commentId}, {fields: {_id: 1}}).fetch(), '_id');
|
||||
commentIds = commentIds.concat(childCommentIds);
|
||||
return Comments.find({_id: {$in: commentIds}});
|
||||
return Comments.find({_id: {$in: commentIds}}, {sort: {score: -1, postedAt: -1}});
|
||||
}
|
||||
return [];
|
||||
});
|
||||
|
|
|
@ -47,7 +47,7 @@ Meteor.publish('postUsers', function(postId) {
|
|||
|
||||
Meteor.publish('postComments', function(postId) {
|
||||
if (can.viewById(this.userId)){
|
||||
return Comments.find({postId: postId});
|
||||
return Comments.find({postId: postId}, {sort: {score: -1, postedAt: -1}});
|
||||
}
|
||||
return [];
|
||||
});
|
Loading…
Add table
Reference in a new issue