WordPress.org

Make WordPress Core

Changeset 33619


Ignore:
Timestamp:
08/15/2015 07:24:42 PM (4 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r33615 r33619  
    43764376         GROUP BY t.term_id
    43774377         HAVING term_tt_count > 1
    4378          LIMIT 20"
     4378         LIMIT 10"
    43794379    );
    43804380
     
    44024402
    44034403    // Split term data recording is slow, so we do it just once, outside the loop.
    4404     $suspend = wp_suspend_cache_invalidation( true );
    44054404    $split_term_data = get_option( '_split_terms', array() );
    44064405    $skipped_first_term = $taxonomies = array();
     
    44334432    }
    44344433
    4435     wp_suspend_cache_invalidation( $suspend );
    44364434    update_option( '_split_terms', $split_term_data );
    44374435
Note: See TracChangeset for help on using the changeset viewer.