Magazine

Accélérer le Traitement des Reqûetes Ajax WordPress grâce à Shortinit

Publié le 22 avril 2018 par Missfx

Introduction & Concept

  • index.php
    • wp-blog-header.php
      • wp-load.php
        • wp-config.php
          • wp-settings.php SHORTINIT

View the code on Gist.

Ajax Shortinit: Simple

Benchmark

Accélération de près de  ~80% de la requête Ajax.

Accélérer le Traitement des Reqûetes Ajax WordPress grâce à Shortinit

Fichier de Gestion Ajax

View the code on Gist.

Action Ajax

View the code on Gist.

Javascript

View the code on Gist.

Liste des fonctions disponibles

SHORTINIT coupe court au chargement de WordPress. Ainsi vous n’aurez accès qu’a quelques centaines de fonctions, dont voici la liste exhaustive:

__return_empty_array
__return_empty_string
__return_false
__return_null
__return_true
__return_zero
_ajax_wp_die_handler
_canonical_charset
_cleanup_header_comment
_config_wp_home
_config_wp_siteurl
_custom_background_cb
_custom_header_background_just_in_time
_custom_logo_header_styles
_default_wp_die_handler
_delete_attachment_theme_mod
_delete_option_fresh_site
_deprecated_argument
_deprecated_constructor
_deprecated_file
_deprecated_function
_deprecated_hook
_device_can_upload
_doing_it_wrong
_get_non_cached_ids
_get_random_header_data
_hash_hmac
_http_build_query
_mb_strlen
_mb_substr
_mce_set_direction
_remove_theme_support
_scalar_wp_die_handler
_wp_call_all_hook
_wp_can_use_pcre_u
_wp_customize_changeset_filter_insert_post_data
_wp_customize_include
_wp_customize_loader_settings
_wp_customize_publish_changeset
_wp_filter_build_unique_id
_wp_json_convert_string
_wp_json_prepare_data
_wp_json_sanity_check
_wp_keep_alive_customize_changeset_dependent_auto_drafts
_wp_mysql_week
_wp_timezone_choice_usort_callback
_wp_upload_dir
_xmlrpc_wp_die_handler
absint
add_action
add_editor_style
add_filter
add_magic_quotes
add_network_option
add_option
add_query_arg
add_site_option
add_theme_support
apache_mod_loaded
apply_filters
apply_filters_deprecated
apply_filters_ref_array
background_color
background_image
bool_from_yn
build_query
cache_javascript_headers
check_theme_switched
current_action
current_filter
current_theme_supports
current_time
date_i18n
dead_db
delete_all_user_settings
delete_expired_transients
delete_network_option
delete_option
delete_site_option
delete_site_transient
delete_transient
delete_user_setting
did_action
display_header_text
do_action
do_action_deprecated
do_action_ref_array
do_enclose
do_feed
do_feed_atom
do_feed_rdf
do_feed_rss
do_feed_rss2
do_robots
doing_action
doing_filter
filter_default_option
force_ssl_admin
form_option
get_all_user_settings
get_allowed_mime_types
get_background_color
get_background_image
get_current_blog_id
get_current_network_id
get_custom_header
get_custom_header_markup
get_editor_stylesheets
get_file_data
get_header_image
get_header_image_tag
get_header_textcolor
get_header_video_settings
get_header_video_url
get_locale_stylesheet_uri
get_main_network_id
get_main_site_id
get_network_option
get_num_queries
get_option
get_random_header_image
get_raw_theme_root
get_registered_settings
get_site_option
get_site_transient
get_status_header_desc
get_stylesheet
get_stylesheet_directory
get_stylesheet_directory_uri
get_stylesheet_uri
get_tag_regex
get_temp_dir
get_template
get_template_directory
get_template_directory_uri
get_theme_mod
get_theme_mods
get_theme_root
get_theme_root_uri
get_theme_roots
get_theme_starter_content
get_theme_support
get_transient
get_uploaded_header_images
get_user_setting
get_weekstartend
global_terms_enabled
has_action
has_custom_header
has_filter
has_header_image
has_header_video
header_image
header_textcolor
iis7_supports_permalinks
is_admin
is_blog_admin
is_blog_installed
is_child_theme
is_customize_preview
is_header_video_active
is_lighttpd_before_150
is_main_network
is_main_site
is_multisite
is_network_admin
is_new_day
is_random_header_image
is_serialized
is_serialized_string
is_ssl
is_user_admin
is_wp_error
locale_stylesheet
maybe_serialize
maybe_unserialize
mbstring_binary_safe_encoding
mysql2date
mysql_to_rfc3339
nocache_headers
number_format_i18n
path_is_absolute path_join
plugin_basename
plugin_dir_path
plugin_dir_url
register_activation_hook
register_deactivation_hook
register_default_headers
register_initial_settings
register_setting
register_theme_directory
register_uninstall_hook
remove_action
remove_all_actions
remove_all_filters
remove_editor_styles
remove_filter
remove_query_arg
remove_theme_mod
remove_theme_mods
remove_theme_support
require_if_theme_supports
require_wp_db
reset_mbstring_encoding
search_theme_directories
send_frame_options_header
send_nosniff_header
set_site_transient
set_theme_mod
set_transient
set_user_setting
shutdown_action_hook
size_format
smilies_init
status_header
switch_theme
the_custom_header_markup
the_header_image_tag
the_header_video_url
timer_start
timer_stop
unregister_default_headers
unregister_setting
update_network_option
update_option
update_site_option
validate_current_theme
validate_file
win_is_writable
wp
wp_allowed_protocols
wp_array_slice_assoc
wp_auth_check
wp_auth_check_html
wp_auth_check_load
wp_cache_add
wp_cache_add_global_groups
wp_cache_add_non_persistent_groups
wp_cache_close
wp_cache_decr
wp_cache_delete
wp_cache_flush
wp_cache_get
wp_cache_get_last_changed
wp_cache_incr
wp_cache_init
wp_cache_replace
wp_cache_reset
wp_cache_set
wp_cache_switch_to_blog
wp_check_filetype
wp_check_filetype_and_ext
wp_check_jsonp_callback
wp_check_php_mysql_versions
wp_checkdate
wp_clean_themes_cache
wp_clone
wp_convert_hr_to_bytes
wp_cookie_constants
wp_custom_css_cb
wp_customize_support_script
wp_customize_url
wp_debug_backtrace_summary
wp_debug_mode
wp_delete_file
wp_die
wp_doing_ajax
wp_doing_cron
wp_ext2type
wp_extract_urls
wp_favicon_request
wp_filter_object_list
wp_finalize_scraping_edited_file_errors
wp_find_hierarchy_loop
wp_find_hierarchy_loop_tortoise_hare
wp_fix_server_vars
wp_functionality_constants
wp_generate_uuid4
wp_get_active_and_valid_plugins
wp_get_custom_css
wp_get_custom_css_post
wp_get_ext_types
wp_get_http_headers
wp_get_image_mime
wp_get_mime_types
wp_get_mu_plugins
wp_get_nocache_headers
wp_get_original_referer
wp_get_raw_referer
wp_get_referer
wp_get_server_protocol
wp_get_theme
wp_get_themes
wp_get_upload_dir
wp_guess_url
wp_initial_constants
wp_installing
wp_is_file_mod_allowed
wp_is_ini_value_changeable
wp_is_numeric_array
wp_is_stream
wp_is_uuid
wp_is_writable
wp_json_encode
wp_list_filter
wp_list_pluck
wp_list_sort
wp_load_alloptions
wp_load_core_site_options
wp_load_translations_early
wp_magic_quotes
wp_maintenance
wp_maybe_decline_date
wp_maybe_load_widgets
wp_mkdir_p
wp_nonce_ays
wp_nonce_field
wp_nonce_url
wp_normalize_path
wp_not_installed
wp_ob_end_flush_all
wp_original_referer_field
wp_parse_args
wp_parse_id_list
wp_parse_slug_list
wp_plugin_directory_constants
wp_post_preview_js
wp_protect_special_option
wp_raise_memory_limit
wp_referer_field
wp_register_plugin_realpath
wp_remote_fopen
wp_removable_query_args
wp_scheduled_delete
wp_send_json
wp_send_json_error
wp_send_json_success
wp_set_all_user_settings
wp_set_internal_encoding
wp_set_lang_dir
wp_set_wpdb_vars
wp_site_admin_email_change_notification
wp_ssl_constants
wp_start_object_cache
wp_start_scraping_edited_file_errors
wp_suspend_cache_addition
wp_suspend_cache_invalidation
wp_templating_constants
wp_timezone_choice
wp_timezone_override_offset
wp_unique_filename
wp_unregister_globals
wp_update_custom_css_post
wp_upload_bits
wp_upload_dir
wp_user_settings
wp_using_ext_object_cache
wp_validate_boolean
wp_widgets_add_menu
xmlrpc_getpostcategory
xmlrpc_getposttitle
xmlrpc_removepostdata

Ajax Shortinit: Sur-Mesure

Benchmark

Accélération de près de  ~70% de la requête Ajax.

Accélérer le Traitement des Reqûetes Ajax WordPress grâce à Shortinit

Fichier de Gestion Ajax

View the code on Gist.

Action Ajax

View the code on Gist.

Javascript

View the code on Gist.

Ajax Shortinit: Avancé

Benchmark

Accélération de près de  ~40% de la requête Ajax.

Accélérer le Traitement des Reqûetes Ajax WordPress grâce à Shortinit

Fichier de Gestion Ajax

View the code on Gist.

Javascript

View the code on Gist.


Retour à La Une de Logo Paperblog

A propos de l’auteur


Missfx 9 partages Voir son profil
Voir son blog

l'auteur n'a pas encore renseigné son compte l'auteur n'a pas encore renseigné son compte l'auteur n'a pas encore renseigné son compte