Is the current solution just to disable the dashboard entirely? So a user would have to rely on email notifications about submitted comments to know which ones to publish in the content tree (it seems that "approving" a comment can be achieved by publishing it)?
As a recommendation, perhaps you could listen to content creation events and if the created content node is a comment, add that to a queue (some sort of storage area that would persist across application restarts). You could then use that queue to populate the list of unapproved comments rather than scanning the entire tree each time the user loads the "Comments" dashboard tab.
Umbraco 7.1.4. As you are aware, uCommentsy doesn't work with this version of Umbraco, so I am using a custom compiled version that does.
You're definitely right. Examine would be much more efficient. It's something I havent considered doing in the past, as it was just the backoffice. I thought a tiny bit of slowness was acceptable. But you've got more than a tiny bit of slowness.
If you've got the time to spare, you could add a custom examine field called "approved", and then use examine in the dashboard control.
By the way, I don't see why I'd need an "approved" field. In theory, I could just use Examine to find all comment nodes, then any that aren't published (i.e., any that return null from UmbracoHelper.TypedContent) would be considered not yet approved (those are the ones I could show in the dashboard).
Regarding the approved field... the reason I would add the flag is if you have 10,000 comments, and only 1 of them is unpublished, then you must instantiate all of them to find the one that isnt unpublished.
In fact, it may actually be better to always publish the comment, but set a flag for "visible/approved".
The dashboard is now super fast on my site with something like 1,500 nodes.
I made the commit to the Umbraco 6 branch, as that was the branch that contained the other commit. I modified a few things locally to make it work with Umbraco 7, but the commit only contains the changes necessary to speed up the dashboard. Also, I didn't use Examine for the initial load, but since you already pulled in that other request to use Examine for the initial load, I left that unchanged (my local version just uses IPublishedContent extension methods since it seems like a reasonable assumption that uCommentsyConfiguration nodes should be published).
uCommentsy "Comments" Dashboard Unusably Slow
I have been waiting for the "Comments" dashboard to load for about 20 minutes now (my site has 1,000+ nodes), and my CPU has been at 50% the entire time. I suspect the problem is that you are using the ContentService here: https://bitbucket.org/anthonydotnet/ucommentsy/src/ac4be9e4b68428419fae78c20af514a6e0362b65/Source/uCommentsy.Web/usercontrols/uCommentsy/Dashboard/admin.ascx.cs?at=default#cl-91
You seem to realize this based on your comment here: http://our.umbraco.org/forum/developers/api-questions/42835-Umbraco-6-ContentService-API-or-Examine
Is the current solution just to disable the dashboard entirely? So a user would have to rely on email notifications about submitted comments to know which ones to publish in the content tree (it seems that "approving" a comment can be achieved by publishing it)?
As a recommendation, perhaps you could listen to content creation events and if the created content node is a comment, add that to a queue (some sort of storage area that would persist across application restarts). You could then use that queue to populate the list of unapproved comments rather than scanning the entire tree each time the user loads the "Comments" dashboard tab.
Umbraco 7.1.4. As you are aware, uCommentsy doesn't work with this version of Umbraco, so I am using a custom compiled version that does.
Hi
You're definitely right. Examine would be much more efficient. It's something I havent considered doing in the past, as it was just the backoffice. I thought a tiny bit of slowness was acceptable. But you've got more than a tiny bit of slowness.
If you've got the time to spare, you could add a custom examine field called "approved", and then use examine in the dashboard control.
You could do a pull request too ;)
Do you accept pull requests? I see somebody submitted one last year for a very similar issue/fix, but you haven't merged it in yet (or declined it): https://bitbucket.org/anthonydotnet/ucommentsy/pull-request/1/speed-up-landing-page-search/diff
By the way, I don't see why I'd need an "approved" field. In theory, I could just use Examine to find all comment nodes, then any that aren't published (i.e., any that return null from UmbracoHelper.TypedContent) would be considered not yet approved (those are the ones I could show in the dashboard).
Holly cow!
That didnt show up on my bitbucket dashboard!
Regarding the approved field... the reason I would add the flag is if you have 10,000 comments, and only 1 of them is unpublished, then you must instantiate all of them to find the one that isnt unpublished.
In fact, it may actually be better to always publish the comment, but set a flag for "visible/approved".
I've merged that fix. It should at least fix the initial load issue.
The search for unpublished comments, is still going to be slow for large sites until lucene is added.
Here you go: https://bitbucket.org/anthonydotnet/ucommentsy/pull-request/2/fix-for-slow-comment-approval-dashboard
The dashboard is now super fast on my site with something like 1,500 nodes.
I made the commit to the Umbraco 6 branch, as that was the branch that contained the other commit. I modified a few things locally to make it work with Umbraco 7, but the commit only contains the changes necessary to speed up the dashboard. Also, I didn't use Examine for the initial load, but since you already pulled in that other request to use Examine for the initial load, I left that unchanged (my local version just uses IPublishedContent extension methods since it seems like a reasonable assumption that uCommentsyConfiguration nodes should be published).
is working on a reply...