From 52a7082d1174024d03097d988fa81b13b6ea0cc6 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 15 Aug 2015 19:25:26 +0000 Subject: [PATCH] Don't suspend cache invalidation when running term splitting batch routine. `wp_suspend_cache_invalidation()` was originally added to increase performance, but the switch to batch processing in [33615] mitigates serious performance concerns. As a precaution against timeouts, the batch size has been reduced from 20 to 10. Props Chouby. See #30261. Built from https://develop.svn.wordpress.org/trunk@33619 git-svn-id: http://core.svn.wordpress.org/trunk@33586 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index ba8156bc63..1db44dcd2d 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4375,7 +4375,7 @@ function _wp_batch_split_terms() { LEFT JOIN {$wpdb->terms} t ON t.term_id = tt.term_id GROUP BY t.term_id HAVING term_tt_count > 1 - LIMIT 20" + LIMIT 10" ); // No more terms, we're done here. @@ -4401,7 +4401,6 @@ function _wp_batch_split_terms() { $shared_tts = $wpdb->get_results( "SELECT * FROM {$wpdb->term_taxonomy} WHERE `term_id` IN ({$shared_term_ids})" ); // Split term data recording is slow, so we do it just once, outside the loop. - $suspend = wp_suspend_cache_invalidation( true ); $split_term_data = get_option( '_split_terms', array() ); $skipped_first_term = $taxonomies = array(); foreach ( $shared_tts as $shared_tt ) { @@ -4432,7 +4431,6 @@ function _wp_batch_split_terms() { _get_term_hierarchy( $tax ); } - wp_suspend_cache_invalidation( $suspend ); update_option( '_split_terms', $split_term_data ); delete_option( $lock_name ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 10a506d98a..b332bb7903 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-RC2-33618'; +$wp_version = '4.3-RC2-33619'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.