Make WordPress Core


Ignore:
Timestamp:
09/17/2015 08:00:31 PM (9 years ago)
Author:
boonebgorges
Message:

Lazy-load comment meta on single post pages.

[34268] introduced cache priming for commentmeta, enabled by default. To
ensure performance on single post pages - where commentmeta is most likely
to cause performance issues - we disable up-front cache-priming. Instead, we
prime commentmeta caches for all comments in the loop the first time
get_comment_meta() is called on the page.

Props bradt, dd32, wonderboymusic, boonebgorges.
Fixes #16894.

File:
1 edited

Legend:

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

    r34252 r34270  
    201201add_filter( 'xmlrpc_pingback_error',    'xmlrpc_pingback_error'               );
    202202add_filter( 'title_save_pre',           'trim'                                );
     203add_filter( 'get_comment_metadata',     'wp_lazyload_comment_meta',     10, 2 );
    203204
    204205add_filter( 'http_request_host_is_external', 'allowed_http_request_hosts', 10, 2 );
Note: See TracChangeset for help on using the changeset viewer.