My site has grown up (100k+ comments) and I realize that it takes several seconds to unpublish each comment. If you expecting same troubles, here is a quick fix: replace string comment_save($comment); in function fasttoggle_comment_option() with $result = db_query('update {comments} set status = %d where cid = %d', $comment->$option, $comment->cid);.

This helped me with Fasttoggle 5, but could also be applied to versions 6 and 7. In version 7 fasttoggle_comment_option() is located in fasttoggle.toggle.inc. And it seems you have to pass arguments to db_query() as an array.

Comments

nigelcunningham’s picture

Version: 5.x-1.1 » 6.x-1.4

Thanks for the hint.

5.x is now unmaintained, so I'll change the version to 6.x so that I remember to do this when I next work on the issue queue.

Romka’s picture

replace string comment_save($comment); in function fasttoggle_comment_option() with $result = db_query('update {comments} set status = %d where cid = %d', $comment->$option, $comment->cid);.

I think it's not good approach, because comment_save function makes several important actions such as calling hook_comment and recalculation node comments counter.

nigelcunningham’s picture

That's a good point, Romka.

ankheg, is there anything you can do in other ways (indexing, caching...)?

nigelcunningham’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)