Please, check out this issue I have just opened for Drupal core:
http://drupal.org/node/50827
It may save commentmail (and probably any other module that implements hook_comment) from reading the comment that has just been inserted into the database.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | contrib-5.commentmail.performance2.junyor.patch | 4.02 KB | junyor |
| #3 | contrib-5.commentmail.performance.junyor.patch | 3.99 KB | junyor |
Comments
Comment #1
sunDrupal core issue seems to be fixed, thus closing this issue.
Comment #2
markus_petrux commented...so the fix in core makes it possible to remove the call to _comment_load() in hook_comment('insert') since the $comment argument has all the information just inserted by the comment module before invoking the hook.
Comment #3
junyor commentedHere's an untested patch that implements this change.
Comment #4
junyor commentedAnd now a tested patch. The $comment variable passed in is an array, not an object.
Comment #5
add1sun commentedThis change was in core for D6 so we won't do this in the D5 version. This new change has be added as part of the upgrade to 6 issue #188698: Port to 6.x.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.