Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: Junyor commentedHere's an untested patch that implements this change.
Comment #4
Junyor CreditAttribution: Junyor commentedAnd now a tested patch. The $comment variable passed in is an array, not an object.
Comment #5
add1sun CreditAttribution: 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) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.