If you have a site with a lot of users update_fix_d7_block_deltas() can take some time. For us, the update function runs 11,673 time each from menu_update_7002() and system_update_7004(), just over 2/3 of the total update function calls, as reported by drush -v. This is quite a lot, especially since we haven't had configurable blocks for 2 years.

Checking ->where('data IS NOT NULL') is nice, but checking for serialize('block') should save enough time to make up for the slow query. The query being slow isn't too much of a problem, for Drupal.org's live server, it completes in about 3 seconds.

CommentFileSizeAuthor
#3 1536160.patch2.23 KBdrumm
#1 1536160.patch872 bytesdrumm
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drumm’s picture

Status: Active » Needs review
FileSize
872 bytes

Here is a patch I'm trying out.

Status: Needs review » Needs work

The last submitted patch, 1536160.patch, failed testing.

drumm’s picture

Status: Needs work » Needs review
FileSize
2.23 KB

This fixes an infinite loop.

drumm’s picture

Issue tags: +drupal.org D7

(tag)

drumm’s picture

This helped a bit with cutting our update time from 14 hours to 9 hours. Removing password rehashing was also part of this.

webchick’s picture

Status: Needs review » Fixed

This is just a performance patch, so not much to test here. The existing tests don't break, so that's encouraging. :)

Committed and pushed to 7.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.