WordPressが遅い。初心に戻って検証してみる。その5- run_init::wordpress/wp-load.php

前述までのWordPressインストール直後のHelloWorldページプロファイリング、 0.896秒、70.0%の処理時間を要した run_init::wordpress/wp-load.php の処理を追いかけてみる。

run_init::wordpress/wp-load.php wp-load.phpをたどると、主だった処理は次の処理。 load_default_textdomain 470,612 52.6% do_action 199,482 22.3%

run_init::wordpress/wp-load.php
 run_init::wordpress/wp-config.php
  run_init::wordpress/wp-settings.php
   load_default_textdomain ※1
   do_action               ※2   
   WP_Locale::__construct   
   create_initial_post_types    
   run_init::wp-includes/default-filters.php    
   create_initial_taxonomies    
   load::wp-includes/post.php   
   load::wp-includes/formatting.php 
   load::wp-includes/taxonomy.php   
   load::wp-includes/query.php
  • run_init::wordpress/wp-load.php
Function Name Calls Calls% Incl. Wall Time(microsec) IWall%
Current Function
run_init::wordpress/wp-load.php 1 9.10% 896,496 70.00%
Exclusive Metrics for Current Function 198 0.00%
Parent function
run_init::wordpress/wp-blog-header.php 1 100.00% 896,496 100.00%
Child functions
run_init::wordpress/wp-config.php 1 16.70% 896,214 100.00%
file_exists 1 16.70% 25 0.00%
load::wordpress/wp-config.php 1 16.70% 19 0.00%
error_reporting 1 16.70% 18 0.00%
define 1 16.70% 12 0.00%
dirname 1 16.70% 10 0.00%

-run_init::wordpress/wp-config.php

Function Name Calls Calls% Incl. Wall Time(microsec) IWall%
run_init::wordpress/wp-config.php 1 4.20% 896,214 70.00%
Exclusive Metrics for Current Function 219 0.00%
Parent function
run_init::wordpress/wp-load.php 1 100.00% 896,214 100.00%
Child functions
run_init::wordpress/wp-settings.php 1 5.30% 895,009 99.90%
load::wordpress/wp-settings.php 1 5.30% 824 0.10%
define 16 84.20% 153 0.00%
defined 1 5.30% 9 0.00%
  • run_init::wordpress/wp-settings.php
Function Name Calls Calls% Incl. Wall Time(microsec) IWall%
Current Function
run_init::wordpress/wp-settings.php 1 0.60% 895,009 69.90%
Exclusive Metrics for Current Function 2,872 0.30%
Parent function
run_init::wordpress/wp-config.php 1 100.00% 895,009 100.00%
Child functions
load_default_textdomain 1 0.60% 470,612 52.60%
do_action 7 4.20% 199,482 22.30%
WP_Locale::__construct 1 0.60% 18,744 2.10%
create_initial_post_types 1 0.60% 18,470 2.10%
run_init::wp-includes/default-filters.php 1 0.60% 14,994 1.70%
create_initial_taxonomies 1 0.60% 13,665 1.50%
load::wp-includes/post.php 1 0.60% 10,678 1.20%
load::wp-includes/formatting.php 1 0.60% 9,463 1.10%
load::wp-includes/taxonomy.php 1 0.60% 7,127 0.80%
load::wp-includes/query.php 1 0.60% 6,704 0.70%
load::wp-includes/link-template.php 1 0.60% 5,437 0.60%
wp_not_installed 1 0.60% 5,393 0.60%
load::wp-includes/general-template.php 1 0.60% 5,215 0.60%
load::wp-includes/deprecated.php 1 0.60% 5,078 0.60%
load::wp-includes/pluggable.php 1 0.60% 4,661 0.50%
load::wp-includes/comment.php 1 0.60% 4,162 0.50%
load::wp-includes/class-http.php 1 0.60% 3,712 0.40%
run_init::wp-includes/script-loader.php 1 0.60% 3,538 0.40%
load::wp-includes/comment-template.php 1 0.60% 3,434 0.40%
load::wp-includes/post-template.php 1 0.60% 3,418 0.40%
load::wp-includes/theme.php 1 0.60% 3,338 0.40%
load::wp-includes/media.php 1 0.60% 3,320 0.40%
load::wp-includes/script-loader.php 1 0.60% 3,272 0.40%
load::wp-includes/user.php 1 0.60% 3,016 0.30%
load::wp-includes/rewrite.php 1 0.60% 2,960 0.30%
wp_cookie_constants 1 0.60% 2,565 0.30%
load::wp-includes/class-wp-theme.php 1 0.60% 2,505 0.30%
load::wp-includes/widgets.php 1 0.60% 2,449 0.30%
load::wp-includes/category-template.php 1 0.60% 2,430 0.30%
load::wp-includes/canonical.php 1 0.60% 2,367 0.30%
load::wp-includes/capabilities.php 1 0.60% 2,354 0.30%
load::wp-includes/kses.php 1 0.60% 2,266 0.30%
WP::init 1 0.60% 2,253 0.30%
require_wp_db 1 0.60% 2,072 0.20%
load::wp-includes/meta.php 1 0.60% 1,905 0.20%
load::wp-includes/admin-bar.php 1 0.60% 1,794 0.20%
load::wp-includes/nav-menu.php 1 0.60% 1,785 0.20%
load::wp-includes/nav-menu-template.php 1 0.60% 1,466 0.20%
run_init::wp-includes/media.php 1 0.60% 1,433 0.20%
load::wp-includes/class-wp.php 1 0.60% 1,412 0.20%
load::wp-includes/update.php 1 0.60% 1,376 0.20%
wp_templating_constants 1 0.60% 1,311 0.10%
wp_set_wpdb_vars 1 0.60% 1,308 0.10%
load::wp-includes/default-filters.php 1 0.60% 1,222 0.10%
wp_start_object_cache 1 0.60% 1,213 0.10%
load::twentyeleven/functions.php 1 0.60% 1,172 0.10%
run_init::pomo/mo.php 1 0.60% 1,097 0.10%
run_init::wp-includes/update.php 1 0.60% 1,055 0.10%
wp_plugin_directory_constants 1 0.60% 1,012 0.10%
load::wp-includes/feed.php 1 0.60% 990 0.10%
wp_get_active_and_valid_plugins 1 0.60% 977 0.10%
load::wp-includes/bookmark.php 1 0.60% 905 0.10%
load::wp-includes/cron.php 1 0.60% 897 0.10%
wp_magic_quotes 1 0.60% 862 0.10%
load::wp-includes/author-template.php 1 0.60% 839 0.10%
wp_set_internal_encoding 1 0.60% 834 0.10%
load::wp-includes/class-wp-walker.php 1 0.60% 772 0.10%
run_init::wp-includes/kses.php 1 0.60% 695 0.10%
run_init::wp-includes/pluggable.php 1 0.60% 662 0.10%
load::wp-includes/template.php 1 0.60% 657 0.10%
load::wp-includes/default-constants.php 1 0.60% 636 0.10%
run_init::twentyeleven/functions.php 1 0.60% 621 0.10%
WP_Rewrite::__construct 1 0.60% 604 0.10%
load::wp-includes/vars.php 1 0.60% 537 0.10%
load::wp-includes/category.php 1 0.60% 535 0.10%
run_init::wp-includes/post.php 1 0.60% 503 0.10%
load::wp-includes/bookmark-template.php 1 0.60% 479 0.10%
load::wp-includes/shortcodes.php 1 0.60% 445 0.00%
run_init::wp-includes/theme.php 1 0.60% 409 0.00%
wp_initial_constants 1 0.60% 404 0.00%
run_init::wp-includes/general-template.php 1 0.60% 349 0.00%
load::wp-includes/pluggable-deprecated.php 1 0.60% 341 0.00%
run_init::wp-includes/admin-bar.php 1 0.60% 263 0.00%
run_init::wp-includes/rewrite.php 1 0.60% 250 0.00%
run_init::wp-includes/vars.php 1 0.60% 246 0.00%
load::wp-includes/functions.php 1 0.60% 227 0.00%
wp_fix_server_vars 1 0.60% 212 0.00%
run_init::wp-includes/canonical.php 1 0.60% 195 0.00%
WP_Widget_Factory::WP_Widget_Factory 1 0.60% 163 0.00%
is_multisite 5 3.00% 159 0.00%
run_init::wp-includes/taxonomy.php 1 0.60% 155 0.00%
wp_set_lang_dir 1 0.60% 148 0.00%
run_init::wp-includes/functions.php 1 0.60% 143 0.00%
wp_ssl_constants 1 0.60% 141 0.00%
run_init::wp-includes/pluggable-deprecated.php 1 0.60% 135 0.00%
run_init::wp-includes/nav-menu-template.php 1 0.60% 128 0.00%
run_init::wp-includes/author-template.php 1 0.60% 125 0.00%
run_init::wp-includes/user.php 1 0.60% 123 0.00%
wp_functionality_constants 1 0.60% 122 0.00%
load::wp-includes/l10n.php 1 0.60% 111 0.00%
run_init::wp-includes/shortcodes.php 1 0.60% 92 0.00%
load::wp-includes/load.php 1 0.60% 91 0.00%
run_init::wp-includes/widgets.php 1 0.60% 87 0.00%
run_init::wp-includes/compat.php 1 0.60% 81 0.00%
load::wp-includes/http.php 1 0.60% 79 0.00%
register_theme_directory 1 0.60% 73 0.00%
wp_get_mu_plugins 1 0.60% 68 0.00%
wp_check_php_mysql_versions 1 0.60% 67 0.00%
validate_file 1 0.60% 67 0.00%
load::wp-includes/plugin.php 1 0.60% 63 0.00%
load::wp-includes/class-wp-error.php 1 0.60% 62 0.00%
load::wp-includes/locale.php 1 0.60% 61 0.00%
load::pomo/mo.php 1 0.60% 60 0.00%
load::wp-includes/post-thumbnail-template.php 1 0.60% 56 0.00%
load::wp-includes/compat.php 1 0.60% 56 0.00%
run_init::wp-includes/deprecated.php 1 0.60% 53 0.00%
run_init::wp-includes/category-template.php 1 0.60% 51 0.00%
run_init::wp-includes/post-template.php 1 0.60% 50 0.00%
is_readable 1 0.60% 50 0.00%
wp_maintenance 1 0.60% 49 0.00%
file_exists 1 0.60% 46 0.00%
run_init::wp-includes/formatting.php 1 0.60% 44 0.00%
run_init::wp-includes/link-template.php 1 0.60% 43 0.00%
load::wp-includes/class-wp-ajax-response.php 1 0.60% 42 0.00%
get_locale 1 0.60% 42 0.00%
get_theme_root 1 0.60% 42 0.00%
run_init::wp-includes/comment-template.php 1 0.60% 41 0.00%
run_init::wp-includes/class-wp-theme.php 1 0.60% 39 0.00%
run_init::wp-includes/comment.php 1 0.60% 38 0.00%
run_init::wp-includes/query.php 1 0.60% 35 0.00%
wp_debug_mode 1 0.60% 32 0.00%
run_init::wp-includes/nav-menu.php 1 0.60% 31 0.00%
date_default_timezone_set 1 0.60% 30 0.00%
define 2 1.20% 28 0.00%
run_init::wp-includes/meta.php 1 0.60% 28 0.00%
timer_start 1 0.60% 28 0.00%
run_init::wp-includes/class-http.php 1 0.60% 28 0.00%
run_init::wp-includes/capabilities.php 1 0.60% 28 0.00%
load::wp-includes/version.php 1 0.60% 27 0.00%
run_init::wp-includes/feed.php 1 0.60% 26 0.00%
wp_unregister_GLOBALS 1 0.60% 25 0.00%
run_init::wp-includes/cron.php 1 0.60% 24 0.00%
ini_set 2 1.20% 24 0.00%
run_init::wp-includes/l10n.php 1 0.60% 23 0.00%
run_init::wp-includes/version.php 1 0.60% 23 0.00%
run_init::wp-includes/class-wp.php 1 0.60% 22 0.00%
run_init::wp-includes/class-wp-walker.php 1 0.60% 21 0.00%
run_init::wp-includes/bookmark.php 1 0.60% 21 0.00%
run_init::wp-includes/template.php 1 0.60% 20 0.00%
defined 2 1.20% 19 0.00%
run_init::wp-includes/default-constants.php 1 0.60% 18 0.00%
run_init::wp-includes/category.php 1 0.60% 17 0.00%
run_init::wp-includes/load.php 1 0.60% 16 0.00%
run_init::wp-includes/locale.php 1 0.60% 15 0.00%
run_init::wp-includes/bookmark-template.php 1 0.60% 15 0.00%
run_init::wp-includes/plugin.php 1 0.60% 14 0.00%
WP_Query::__construct 1 0.60% 14 0.00%
run_init::wp-includes/http.php 1 0.60% 14 0.00%
register_shutdown_function 1 0.60% 13 0.00%
wp_favicon_request 1 0.60% 12 0.00%
run_init::wp-includes/post-thumbnail-template.php 1 0.60% 11 0.00%
run_init::wp-includes/class-wp-error.php 1 0.60% 10 0.00%
run_init::wp-includes/class-wp-ajax-response.php 1 0.60% 9 0.00%
function_exists 1 0.60% 9 0.00%

次は load_default_textdomain を優先してみてみよう。