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.
In privatemsg_sql_deleted() a query is run against pm_message and then joined to pm_index. This is unnecessary because all the fields we want to select or filter on are in pm_index.
I believe that we can improve the performance of the query by getting rid of the join and only using the smaller pm_index table.
Comment | File | Size | Author |
---|---|---|---|
#2 | privatemsg-improve_message_flushing_performance-2659226-1.patch | 728 bytes | hosef |
Comments
Comment #2
hosef CreditAttribution: hosef at Hook 42 commentedHere is an initial patch that improved performance in my tests.
Comment #3
oadaeh CreditAttribution: oadaeh at Hook 42 commentedThe code looks good, and it operates correctly & quicker than the original.
Comment #4
Kristen PolThis looks good to me too. RTBC++
Comment #6
oadaeh CreditAttribution: oadaeh at Hook 42 commentedThis patch has been in production for over a year, so I think it is okay.