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
Comment #1
nigelcunningham commentedThanks 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.
Comment #2
Romka commentedreplace 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.
Comment #3
nigelcunningham commentedThat's a good point, Romka.
ankheg, is there anything you can do in other ways (indexing, caching...)?
Comment #4
nigelcunningham commented